aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorLuis Machado <luisgpm@br.ibm.com>2011-09-07 02:33:58 +0000
committerLuis Machado <luisgpm@br.ibm.com>2011-09-07 02:33:58 +0000
commit861152be0e99b1f69a1ce907d9067dc6123ac4da (patch)
tree34765500cd9ce8e42075c50bc4f6c2d2679569aa /gdb/frame.c
parent27e78320b004657c8e8a48b45eaf1801721fd684 (diff)
downloadgdb-861152be0e99b1f69a1ce907d9067dc6123ac4da.zip
gdb-861152be0e99b1f69a1ce907d9067dc6123ac4da.tar.gz
gdb-861152be0e99b1f69a1ce907d9067dc6123ac4da.tar.bz2
2011-09-06 Luis Machado <lgustavo@codesourcery.com>
* frame.c (has_stack_frames): Check for currently selected traceframe.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index 37f106a..fc581fb 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1328,17 +1328,21 @@ has_stack_frames (void)
if (!target_has_registers || !target_has_stack || !target_has_memory)
return 0;
- /* No current inferior, no frame. */
- if (ptid_equal (inferior_ptid, null_ptid))
- return 0;
+ /* Traceframes are effectively a substitute for the live inferior. */
+ if (get_traceframe_number () < 0)
+ {
+ /* No current inferior, no frame. */
+ if (ptid_equal (inferior_ptid, null_ptid))
+ return 0;
- /* Don't try to read from a dead thread. */
- if (is_exited (inferior_ptid))
- return 0;
+ /* Don't try to read from a dead thread. */
+ if (is_exited (inferior_ptid))
+ return 0;
- /* ... or from a spinning thread. */
- if (is_executing (inferior_ptid))
- return 0;
+ /* ... or from a spinning thread. */
+ if (is_executing (inferior_ptid))
+ return 0;
+ }
return 1;
}