diff options
author | Stan Shebs <shebs@codesourcery.com> | 2010-04-16 01:12:07 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2010-04-16 01:12:07 +0000 |
commit | 2ce6d6bf7c5f2c7ef3e816b1c64b4e14e52ca6bd (patch) | |
tree | 9dbede613a4c00ab45e1f711739d6a3bd82797b1 /gdb/frame.c | |
parent | 47edb3fead1279670ab27f6f983897d47ef87995 (diff) | |
download | gdb-2ce6d6bf7c5f2c7ef3e816b1c64b4e14e52ca6bd.zip gdb-2ce6d6bf7c5f2c7ef3e816b1c64b4e14e52ca6bd.tar.gz gdb-2ce6d6bf7c5f2c7ef3e816b1c64b4e14e52ca6bd.tar.bz2 |
2010-04-15 Stan Shebs <stan@codesourcery.com>
* frame.c: Include tracepoint.h.
(get_current_frame): Allow a trace frame to be an alternate source
of stack frame data.
* tracepoint.c (tfind_1): Don't try to get current stack frame if
it won't succeed.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index aaa70da..0b0c5b4 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -43,6 +43,7 @@ #include "gdbthread.h" #include "block.h" #include "inline-frame.h" +#include "tracepoint.h" static struct frame_info *get_prev_frame_1 (struct frame_info *this_frame); static struct frame_info *get_prev_frame_raw (struct frame_info *this_frame); @@ -1144,12 +1145,16 @@ get_current_frame (void) error (_("No stack.")); if (!target_has_memory) error (_("No memory.")); - if (ptid_equal (inferior_ptid, null_ptid)) - error (_("No selected thread.")); - if (is_exited (inferior_ptid)) - error (_("Invalid selected thread.")); - if (is_executing (inferior_ptid)) - error (_("Target is executing.")); + /* Traceframes are effectively a substitute for the live inferior. */ + if (get_traceframe_number () < 0) + { + if (ptid_equal (inferior_ptid, null_ptid)) + error (_("No selected thread.")); + if (is_exited (inferior_ptid)) + error (_("Invalid selected thread.")); + if (is_executing (inferior_ptid)) + error (_("Target is executing.")); + } if (current_frame == NULL) { |