From: Christopher Head Date: Mon, 10 Aug 2020 18:09:02 +0000 (-0700) Subject: server/gdb_server: fix incorrect condition check X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=401086186f2560b7c45ea53c200a0558f84437be;p=fw%2Fopenocd server/gdb_server: fix incorrect condition check 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 Reviewed-on: http://openocd.zylin.com/5794 Reviewed-by: Tomas Vanek Tested-by: jenkins Reviewed-by: Antonio Borneo --- diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 61d7686c4..f94b72817 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -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));