diff options
author | Pedro Alves <palves@redhat.com> | 2010-02-24 01:06:28 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-02-24 01:06:28 +0000 |
commit | 06cd862c015ff7285816de9e36290b5b1a7b090e (patch) | |
tree | d053a8ccb0bdadc5088e59e7728b7f4a2961b66f /gdb/infrun.c | |
parent | ab92d69b1e3a3db7bd4f9564ad3b5bbccc9a7988 (diff) | |
download | gdb-06cd862c015ff7285816de9e36290b5b1a7b090e.zip gdb-06cd862c015ff7285816de9e36290b5b1a7b090e.tar.gz gdb-06cd862c015ff7285816de9e36290b5b1a7b090e.tar.bz2 |
* tracepoint.h (set_traceframe_number)
(cleanup_restore_current_traceframe): Declare.
* tracepoint.c (set_traceframe_number): New.
(struct current_traceframe_cleanup): New.
(do_restore_current_traceframe_cleanup)
(restore_current_traceframe_cleanup_dtor)
(make_cleanup_restore_current_traceframe): New.
* infrun.c: Include tracepoint.h.
(fetch_inferior_event): Switch out and in of tfind mode.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index a715596..9a5c3a8 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -51,6 +51,7 @@ #include "record.h" #include "inline-frame.h" #include "jit.h" +#include "tracepoint.h" /* Prototypes for local functions */ @@ -1761,6 +1762,16 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step) "infrun: proceed (addr=%s, signal=%d, step=%d)\n", paddress (gdbarch, addr), siggnal, step); + /* We're handling a live event, so make sure we're doing live + debugging. If we're looking at traceframes while the target is + running, we're going to need to get back to that mode after + handling the event. */ + if (non_stop) + { + make_cleanup_restore_current_traceframe (); + set_traceframe_number (-1); + } + if (non_stop) /* In non-stop, each thread is handled individually. The context must already be set to the right thread here. */ |