This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Handle hitting a recording extent boundary as a normal trap-caused stop


Because that's what it is.

This enables reporting of a breakpoint hitting on the first replayable
instruction when reverse-stepping to the beginning of recorded history.
---
 gdb/infrun.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 150288264f..a72f06129b 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -5212,11 +5212,12 @@ Cannot fill $_exitsignal with the correct signal number.\n"));
       ecs->event_thread->suspend.stop_pc
 	= regcache_read_pc (get_thread_regcache (inferior_thread ()));
 
-      if (handle_stop_requested (ecs))
-	return;
-
       gdb::observers::no_history.notify ();
-      stop_waiting (ecs);
+
+      // The end of history is always a stop after a stepping/running op
+      ecs->ws.kind = TARGET_WAITKIND_STOPPED;
+      ecs->ws.value.sig = GDB_SIGNAL_TRAP;
+      handle_signal_stop (ecs);
       return;
     }
 }
-- 
2.16.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]