public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Handle hitting a recording extent boundary as a normal trap-caused stop
@ 2019-01-04 21:38 Andrey Utkin
  2019-01-07 16:07 ` Andrey Utkin
  2019-01-17 15:34 ` Tom Tromey
  0 siblings, 2 replies; 3+ messages in thread
From: Andrey Utkin @ 2019-01-04 21:38 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrey Utkin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Handle hitting a recording extent boundary as a normal trap-caused stop
  2019-01-04 21:38 [PATCH] Handle hitting a recording extent boundary as a normal trap-caused stop Andrey Utkin
@ 2019-01-07 16:07 ` Andrey Utkin
  2019-01-17 15:34 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Andrey Utkin @ 2019-01-07 16:07 UTC (permalink / raw)
  To: gdb-patches

Raised a related bugticket
https://sourceware.org/bugzilla/show_bug.cgi?id=24073 (Breakpoint on the
first insn of recorded history is not reported in replay).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Handle hitting a recording extent boundary as a normal trap-caused stop
  2019-01-04 21:38 [PATCH] Handle hitting a recording extent boundary as a normal trap-caused stop Andrey Utkin
  2019-01-07 16:07 ` Andrey Utkin
@ 2019-01-17 15:34 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2019-01-17 15:34 UTC (permalink / raw)
  To: Andrey Utkin; +Cc: gdb-patches

>>>>> "Andrey" == Andrey Utkin <autkin@undo.io> writes:

Andrey> Because that's what it is.
Andrey> This enables reporting of a breakpoint hitting on the first replayable
Andrey> instruction when reverse-stepping to the beginning of recorded history.

Hi.  Thanks for the patch.

See the contribution checklist for some info on how to submit a patch:

    https://sourceware.org/gdb/wiki/ContributionChecklist

This one is missing a ChangeLog and perhaps a test case, assuming the
latter is reasonably possible to write.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-17 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 21:38 [PATCH] Handle hitting a recording extent boundary as a normal trap-caused stop Andrey Utkin
2019-01-07 16:07 ` Andrey Utkin
2019-01-17 15:34 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).