From f254e8651126ef05affad77a66d307fedc8c2406 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Wed, 20 Jul 2022 22:46:52 +0100 Subject: [PATCH] gdb_main: Add some output in the scan commands to indicate when still attached that you aren't after the command, despite what GDB thinks --- src/gdb_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gdb_main.c b/src/gdb_main.c index a8e1c541..4f64fd49 100644 --- a/src/gdb_main.c +++ b/src/gdb_main.c @@ -67,8 +67,10 @@ static void handle_kill_target(void); static void gdb_target_destroy_callback(struct target_controller *tc, target *t) { (void)tc; - if (cur_target == t) + if (cur_target == t) { + gdb_out("You are now detached from the previous target.\n"); cur_target = NULL; + } if (last_target == t) last_target = NULL; @@ -194,7 +196,7 @@ int gdb_main_loop(struct target_controller *tc, bool in_syscall) target_addr watch; enum target_halt_reason reason; - if(!cur_target) { + if (!cur_target) { /* Report "target exited" if no target */ gdb_putpacketz("W00"); break; @@ -324,7 +326,7 @@ int gdb_main_loop(struct target_controller *tc, bool in_syscall) handle_q_packet(pbuf, size); break; - case 'v': /* General query packet */ + case 'v': /* Verbose command packet */ handle_v_packet(pbuf, size); break;