diff options
author | Richard Bunt <richard.bunt@linaro.org> | 2023-05-19 08:17:20 +0100 |
---|---|---|
committer | Richard Bunt <richard.bunt@linaro.org> | 2023-05-19 11:29:43 +0100 |
commit | 712872748deffff984c79b875550e46359ba053b (patch) | |
tree | 930e192e593447304b2616311306c67fcbe64256 /gdb/stack.c | |
parent | e84060b489746d031ed1ec9e7b6b39fdf4b6cfe3 (diff) | |
download | gdb-712872748deffff984c79b875550e46359ba053b.zip gdb-712872748deffff984c79b875550e46359ba053b.tar.gz gdb-712872748deffff984c79b875550e46359ba053b.tar.bz2 |
gdb: Remove redundant frame switching
547ce8f00b fixed an issue where dynamic types were not being resolved
correctly prior to printing a value. The same issue was discovered when
printing the value using mi-mode, which was not covered by the fix.
Porting the fix to the mi-mode code path resolved the issue.
However, it was discovered that a later patch series, ending
2fc3b8a4cb8, independently fixed the issue in both the cli- and mi-mode
code paths, making the original fix unneeded.
This commit removes this extra frame switch and adds test coverage for
the mi-mode scenario to protect against any future divergence in this
area.
GDB built with GCC 11.
No test suite regressions detected. Compilers: GCC 12.1.0, ACfL 22.1,
Intel 22.1; Platforms: x86_64, aarch64.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/stack.c')
-rw-r--r-- | gdb/stack.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index b1b25aa..e941eb6 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -742,12 +742,6 @@ print_frame_args (const frame_print_options &fp_opts, = (print_names && fp_opts.print_frame_arguments != print_frame_arguments_none); - /* Temporarily change the selected frame to the given FRAME. - This allows routines that rely on the selected frame instead - of being given a frame as parameter to use the correct frame. */ - scoped_restore_selected_frame restore_selected_frame; - select_frame (frame); - if (func) { const struct block *b = func->value_block (); |