]> git.sur5r.net Git - openocd/commitdiff
gdb_server: remove target_handle_event from gdb event callback
authorHsiangkai Wang <hsiangkai@gmail.com>
Wed, 1 May 2013 02:23:38 +0000 (10:23 +0800)
committerFreddie Chopin <freddie.chopin@gmail.com>
Mon, 6 May 2013 14:44:41 +0000 (14:44 +0000)
In target_call_event_callbacks(), it will execute

1. target_handle_event (use Jim_EvalObj() to evaluate event
   statements in config files)
2. call user registered callbacks

Before calling user registered callbacks, target_handle_event has
been executed.  So, there is no need to call target_handle_event()
in gdb event callback.  It will execute event statements in config
files twice.

Change-Id: I84629e324fa3eb909907badf2319b4138ba89f07
Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com>
Reviewed-on: http://openocd.zylin.com/1372
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
src/server/gdb_server.c

index e7f54281f836137984bfb9fbb9c1f2d955d1b58e..cd7265802479161d09abb2e84a44ab49099c721a 100644 (file)
@@ -719,7 +719,6 @@ static int gdb_target_callback_event_handler(struct target *target,
        int retval;
        struct connection *connection = priv;
 
-       target_handle_event(target, event);
        switch (event) {
                case TARGET_EVENT_GDB_HALT:
                        gdb_frontend_halted(target, connection);