aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-13 18:09:30 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-13 18:09:30 +0000
commit1594fa5616a49b5942c88b9e569fddc5c8e54753 (patch)
treee201db522c8e73e8e057dfc3433f7fcb3d0c60e0 /gdb/frame.c
parentab829d36ec25f884e57ec8eb9a39b0cbb6bc7bd0 (diff)
downloadgdb-1594fa5616a49b5942c88b9e569fddc5c8e54753.zip
gdb-1594fa5616a49b5942c88b9e569fddc5c8e54753.tar.gz
gdb-1594fa5616a49b5942c88b9e569fddc5c8e54753.tar.bz2
2003-03-13 Andrew Cagney <cagney@redhat.com>
* frame.c (legacy_frame_p): New function. (get_prev_frame): Use legacy_frame_p. * frame.h (legacy_frame_p): Declare.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index 267d484..94e9a4a 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1327,10 +1327,7 @@ get_prev_frame (struct frame_info *this_frame)
the legacy get_prev_frame method. Just don't try to unwind a
sentinel frame using that method - it doesn't work. All sentinal
frames use the new unwind code. */
- if ((DEPRECATED_INIT_FRAME_PC_P ()
- || DEPRECATED_INIT_FRAME_PC_FIRST_P ()
- || DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()
- || FRAME_CHAIN_P ())
+ if (legacy_frame_p (current_gdbarch)
&& this_frame->level >= 0)
{
prev_frame = legacy_get_prev_frame (this_frame);
@@ -1696,6 +1693,15 @@ deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
return frame;
}
+int
+legacy_frame_p (struct gdbarch *current_gdbarch)
+{
+ return (DEPRECATED_INIT_FRAME_PC_P ()
+ || DEPRECATED_INIT_FRAME_PC_FIRST_P ()
+ || DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()
+ || FRAME_CHAIN_P ());
+}
+
void
_initialize_frame (void)
{