From: Andrew Cagney Date: Tue, 19 Nov 2002 00:46:00 +0000 (+0000) Subject: 2002-11-18 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85cf597a18e830baf9e3b8f6328e4e5aed5dcb12;p=binutils-gdb.git 2002-11-18 Andrew Cagney * stack.c (frame_relative_level): Copy function from here ... * frame.c (frame_relative_level): ...to here. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f9231cf61f4..54400461bae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-11-18 Andrew Cagney + + * stack.c (frame_relative_level): Copy function from here ... + * frame.c (frame_relative_level): ...to here. + 2002-11-18 Andrew Cagney * frame.h (enum frame_type): Define. diff --git a/gdb/frame.c b/gdb/frame.c index 616977eebb4..d0e6b831e2a 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) { diff --git a/gdb/stack.c b/gdb/stack.c index f98c98ee2db..aee76792ea0 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -115,22 +115,6 @@ extern int addressprint; /* Print addresses, or stay symbolic only? */ struct frame_info *selected_frame; -/* Level of the selected frame: - 0 for innermost, 1 for its caller, ... - or -1 for frame specified by address with no defined level. */ - -/* Level of the selected frame: 0 for innermost, 1 for its caller, ... - or -1 for NULL frame. */ - -int -frame_relative_level (struct frame_info *fi) -{ - if (fi == NULL) - return -1; - else - return fi->level; -} - /* Zero means do things normally; we are interacting directly with the user. One means print the full filename and linenumber when a frame is printed, and do so in a format emacs18/emacs19.22 can