aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-10-28 11:46:33 -0600
committerTom Tromey <tom@tromey.com>2023-10-30 21:47:36 -0600
commit1f9e9ea5b7cd1554db5a5e9da92a6882f1cce40e (patch)
tree5461232c2d5f2a3b211f506b826cc861190db590 /gdb/stack.c
parenta05b22b6c7ff0f48b92086f523f8227d26c84f49 (diff)
downloadbinutils-1f9e9ea5b7cd1554db5a5e9da92a6882f1cce40e.zip
binutils-1f9e9ea5b7cd1554db5a5e9da92a6882f1cce40e.tar.gz
binutils-1f9e9ea5b7cd1554db5a5e9da92a6882f1cce40e.tar.bz2
Remove some frame invalidation code
I stumbled across a few spots that mention that a function "invalidates frame" and also assignments of NULL to a frame_info_ptr. This code isn't harmful, but is also unnecessary since the introduction of frame_info_ptr -- nowadays frame invalidations are handled automatically. Regression tested on x86-64 Fedora 38. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 0b35d62..39dcefa 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -2326,9 +2326,7 @@ prepare_reg (const char *regexp, gdb::optional<compiled_regex> *reg)
If T_REGEXP is not NULL, only print local variables whose type
matches T_REGEXP.
If no local variables have been printed and !QUIET, prints a message
- explaining why no local variables could be printed.
-
- This function will invalidate FRAME. */
+ explaining why no local variables could be printed. */
static void
print_frame_local_vars (frame_info_ptr frame,
@@ -2490,9 +2488,7 @@ iterate_over_block_arg_vars (const struct block *b,
If T_REGEXP is not NULL, only print argument variables whose type
matches T_REGEXP.
If no argument variables have been printed and !QUIET, prints a message
- explaining why no argument variables could be printed.
-
- This function will invalidate FRAME. */
+ explaining why no argument variables could be printed. */
static void
print_frame_arg_vars (frame_info_ptr frame,
@@ -2531,9 +2527,6 @@ print_frame_arg_vars (frame_info_ptr frame,
iterate_over_block_arg_vars (func->value_block (), cb_data);
- /* do_print_variable_and_value invalidates FRAME. */
- frame = NULL;
-
if (!cb_data.values_printed && !quiet)
{
if (regexp == NULL && t_regexp == NULL)