From f6169c567523b4235902d663ba574e1f549f4e48 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Mon, 9 Oct 2023 14:38:50 +0100 Subject: [PATCH 1/2] gdb_main: Fixed a clang-tidy lint about a pointless assignment left over from the gdb_main_loop() restructure --- src/gdb_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gdb_main.c b/src/gdb_main.c index 8af934921b9..4b8c1eba931 100644 --- a/src/gdb_main.c +++ b/src/gdb_main.c @@ -223,7 +223,6 @@ int gdb_main_loop(target_controller_s *tc, char *pbuf, size_t pbuf_size, size_t target_halt_resume(cur_target, single_step); SET_RUN_STATE(true); - single_step = false; /* fall through */ case '?': { /* '?': Request reason for target halt */ /* @@ -438,7 +437,7 @@ static void exec_q_supported(const char *packet, const size_t length) (void)packet; (void)length; - /* + /* * This is the first packet sent by GDB, so we can reset the NoAckMode flag here in case * the previous session was terminated abruptly with NoAckMode enabled */ @@ -527,9 +526,9 @@ static void exec_q_thread_info(const char *packet, const size_t length) gdb_putpacketz("l"); } -/* +/* * GDB will send the packet 'QStartNoAckMode' to enable NoAckMode - * + * * To tell GDB to not use NoAckMode do the following before connnecting to the probe: * set remote noack-packet off */ From 31ff9ca759bdc480454637a5fedd40642a13a028 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Mon, 9 Oct 2023 14:40:18 +0100 Subject: [PATCH 2/2] target: Added some documentation on how the `TARGET_HALT_{BREAK,WATCH}POINT` values are used --- src/include/target.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/include/target.h b/src/include/target.h index 33303c399c2..b8052147f91 100644 --- a/src/include/target.h +++ b/src/include/target.h @@ -78,7 +78,12 @@ typedef enum target_halt_reason { TARGET_HALT_ERROR, /* Failed to read target status */ TARGET_HALT_REQUEST, TARGET_HALT_STEPPING, + /* + * Used to both indicate that the target hit a breakpoint, and to + * indicate that the target hit a watchpoint but we can't figure out which + */ TARGET_HALT_BREAKPOINT, + /* Used to indicate the target hit a watchpoint and we know which */ TARGET_HALT_WATCHPOINT, TARGET_HALT_FAULT, } target_halt_reason_e;