diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-11-19 00:46:00 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-11-19 00:46:00 +0000 |
commit | 85cf597a18e830baf9e3b8f6328e4e5aed5dcb12 (patch) | |
tree | e76646cc3c3aa7fa566fbe23a588b6d3092f59b1 /gdb/frame.c | |
parent | 66b7e2229f4befd0accc7f0844e08074d4e37a51 (diff) | |
download | gdb-85cf597a18e830baf9e3b8f6328e4e5aed5dcb12.zip gdb-85cf597a18e830baf9e3b8f6328e4e5aed5dcb12.tar.gz gdb-85cf597a18e830baf9e3b8f6328e4e5aed5dcb12.tar.bz2 |
2002-11-18 Andrew Cagney <ac131313@redhat.com>
* stack.c (frame_relative_level): Copy function from here ...
* frame.c (frame_relative_level): ...to here.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index 616977e..d0e6b83 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1007,6 +1007,18 @@ get_frame_pc (struct frame_info *frame) return frame->pc; } +/* Level of the selected frame: 0 for innermost, 1 for its caller, ... + or -1 for a NULL frame. */ + +int +frame_relative_level (struct frame_info *fi) +{ + if (fi == NULL) + return -1; + else + return fi->level; +} + enum frame_type get_frame_type (struct frame_info *frame) { |