Skip to content

Commit

Permalink
gdb_server: remove call to jtag_execute_queue()
Browse files Browse the repository at this point in the history
In the initial commit 6c9b804
in 2007's svn:https://svn.berlios.de/openocd/trunk@246
a target script gdb_program_config was called before gdb flash
programming. To guarantee the script does not left any pending
command in the jtag queue, a call to jtag_execute_queue() was
inserted after the execution of the script.

In following commit ef1cfb2
in 2008's svn:https://svn.berlios.de/openocd/trunk@975
the script was replaced by the event "old-gdb_program_config" and
the call to jtag_execute_queue() get executed in every case, even
if the event handler was not present.

At last, commit bb3793c
("target: remove legacy target events") stripped away the
obsolete event but left the call to jtag_execute_queue(), now
completely useless.

Remove the call to jtag_execute_queue() and clean-up the code
around it.

Change-Id: I284f54d656d431ad6cdc25ca18218c09db31bd25
Signed-off-by: Antonio Borneo <[email protected]>
Reviewed-on: http:https://openocd.zylin.com/4911
Tested-by: jenkins
Reviewed-by: Tomas Vanek <[email protected]>
  • Loading branch information
borneoa authored and tom-van committed Jun 6, 2019
1 parent 02cd1e3 commit 0cba5b4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/server/gdb_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,6 @@ static void gdb_frontend_halted(struct target *target, struct connection *connec
static int gdb_target_callback_event_handler(struct target *target,
enum target_event event, void *priv)
{
int retval;
struct connection *connection = priv;
struct gdb_service *gdb_service = connection->service->priv;

Expand All @@ -917,11 +916,6 @@ static int gdb_target_callback_event_handler(struct target *target,
case TARGET_EVENT_HALTED:
target_call_event_callbacks(target, TARGET_EVENT_GDB_END);
break;
case TARGET_EVENT_GDB_FLASH_ERASE_START:
retval = jtag_execute_queue();
if (retval != ERROR_OK)
return retval;
break;
default:
break;
}
Expand Down

0 comments on commit 0cba5b4

Please sign in to comment.