]> git.gag.com Git - fw/openocd/commitdiff
server/gdb_server: fix incorrect condition check
authorChristopher Head <chead@zaber.com>
Mon, 10 Aug 2020 18:09:02 +0000 (11:09 -0700)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 16 Aug 2020 10:49:20 +0000 (11:49 +0100)
The warning message should be printed if the target is NOT halted, not
if it IS halted.

Change-Id: I0a38292a8a2e20e4a4a5ada92b475d551d4cbf38
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/5794
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/server/gdb_server.c

index 61d7686c44b7bd16a01bc2d58d21ae28d88e2608..f94b7281729a1c867939da3ba289fd824166c7c6 100644 (file)
@@ -1025,7 +1025,7 @@ static int gdb_new_connection(struct connection *connection)
                return ERROR_TARGET_NOT_EXAMINED;
        }
 
-       if (target->state == TARGET_HALTED)
+       if (target->state != TARGET_HALTED)
                LOG_WARNING("GDB connection %d on target %s not halted",
                                        gdb_actual_connections, target_name(target));