aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 2d6712a..e633566 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1,6 +1,6 @@
/* Print and select stack frames for GDB, the GNU debugger.
- Copyright (C) 1986-2024 Free Software Foundation, Inc.
+ Copyright (C) 1986-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -827,7 +827,7 @@ print_frame_args (const frame_print_options &fp_opts,
(1) Because find_saved_registers may be slow for
remote debugging.
- (2) Because registers are often re-used and stack
+ (2) Because registers are often reused and stack
slots rarely (never?) are. Therefore using
the stack slot is much less likely to print
garbage.
@@ -2696,7 +2696,7 @@ return_command (const char *retval_exp, int from_tty)
thisfun = get_frame_function (thisframe);
gdbarch = get_frame_arch (thisframe);
- if (get_frame_type (get_current_frame ()) == INLINE_FRAME)
+ if (get_frame_type (thisframe) == INLINE_FRAME)
error (_("Can not force return from an inlined function."));
/* Compute the return value. If the computation triggers an error,
@@ -2863,9 +2863,11 @@ find_frame_for_function (const char *function_name)
do
{
+ CORE_ADDR frame_pc = get_frame_address_in_block (frame);
+
for (size_t i = 0; (i < sals.size () && !found); i++)
- found = (get_frame_pc (frame) >= func_bounds[i].low
- && get_frame_pc (frame) < func_bounds[i].high);
+ found = (frame_pc >= func_bounds[i].low
+ && frame_pc < func_bounds[i].high);
if (!found)
{
level = 1;
@@ -3260,9 +3262,7 @@ static struct cmd_list_element *select_frame_cmd_list = NULL;
/* Commands with a prefix of `info frame'. */
static struct cmd_list_element *info_frame_cmd_list = NULL;
-void _initialize_stack ();
-void
-_initialize_stack ()
+INIT_GDB_FILE (stack)
{
struct cmd_list_element *cmd;