summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-05-05 02:24:38 +0000
committerAndrew Cagney <cagney@redhat.com>2002-05-05 02:24:38 +0000
commit110aca59f58b74df860e3ac8dd404895f30658f6 (patch)
treef716fcfc6ac28593f73789178d60ccf3deae0ab6
parent8853295779854cf20e8683e2a993405f0fa2064c (diff)
downloadgdb-110aca59f58b74df860e3ac8dd404895f30658f6.tar.gz
* stack.c (select_and_print_frame): Make static. Delete the
parameter `level'. (func_command): Update call. (select_frame_command): Delete code computing the frame level. * frame.h (select_and_print_frame): Delete declaration.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/frame.h2
-rw-r--r--gdb/stack.c22
3 files changed, 12 insertions, 20 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 214793733a4..847942f9853 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2002-05-04 Andrew Cagney <ac131313@redhat.com>
+ * stack.c (select_and_print_frame): Make static. Delete the
+ parameter `level'.
+ (func_command): Update call.
+ (select_frame_command): Delete code computing the frame level.
+ * frame.h (select_and_print_frame): Delete declaration.
+
+2002-05-04 Andrew Cagney <ac131313@redhat.com>
+
* sparc-tdep.c (sparc_get_saved_register): Comment why
get_prev_frame call is safe.
diff --git a/gdb/frame.h b/gdb/frame.h
index 9a041c49f49..f0631b01555 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -248,8 +248,6 @@ extern void select_frame (struct frame_info *);
extern void record_selected_frame (CORE_ADDR *, int *);
-extern void select_and_print_frame (struct frame_info *, int);
-
extern void print_frame_info (struct frame_info *, int, int, int);
extern void show_frame_info (struct frame_info *, int, int, int);
diff --git a/gdb/stack.c b/gdb/stack.c
index 75eb6a1f274..2dab0deb016 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1490,13 +1490,13 @@ select_frame (struct frame_info *fi)
/* Select frame FI. Also print the stack frame and show the source if
this is the tui version. */
-void
-select_and_print_frame (struct frame_info *fi, int level)
+static void
+select_and_print_frame (struct frame_info *fi)
{
select_frame (fi);
if (fi)
{
- print_stack_frame (fi, level, 1);
+ print_stack_frame (fi, frame_relative_level (fi), 1);
}
}
@@ -1594,20 +1594,6 @@ select_frame_command (char *level_exp, int from_tty)
frame = parse_frame_specification (level_exp);
- /* Try to figure out what level this frame is. But if there is
- no current stack, don't error out -- let the user set one. */
- frame1 = 0;
- if (get_current_frame ())
- {
- for (frame1 = get_prev_frame (0);
- frame1 && frame1 != frame;
- frame1 = get_prev_frame (frame1))
- level++;
- }
-
- if (!frame1)
- level = 0;
-
select_frame (frame);
}
@@ -1865,7 +1851,7 @@ func_command (char *arg, int from_tty)
if (!found)
printf_filtered ("'%s' not within current stack frame.\n", arg);
else if (fp != selected_frame)
- select_and_print_frame (fp, level);
+ select_and_print_frame (fp);
}
/* Gets the language of the current frame. */