public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: add missing prepare_reinflate call in print_frame_info
@ 2022-11-10 16:34 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2022-11-10 16:34 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aeba2026b58a8abfc35c390f07bcdaf42728e7b5
commit aeba2026b58a8abfc35c390f07bcdaf42728e7b5
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Fri Oct 21 11:49:44 2022 -0400
gdb: add missing prepare_reinflate call in print_frame_info
print_frame_info calls frame_info_ptr::reinflate, but not
frame_info_ptr::prepare_reinflate, add the call to prepare_reinflate.
It works right now, because all callers of print_frame_info that could
possibly lead to the pretty printers being called, and the frame_info
objects being invalidated, do call prepare_reinflate themselves. And
since the cached frame id is copied when passing a frame_info_ptr by
value, print_frame_info does have a cached frame id on entry. So
technically, this change isn't needed. But I don't think it's good for
a function to rely on its callers to have called prepare_reinflate, if
it intends to call reinflate.
Change-Id: Ie332b2d5479aef46f83fdc1120c7c83f4e84d1b0
Reviewed-By: Bruno Larsen <blarsen@redhat.com>
Diff:
---
gdb/stack.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/stack.c b/gdb/stack.c
index 5f29566fcfe..4ad51c2eb50 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1047,6 +1047,8 @@ print_frame_info (const frame_print_options &fp_opts,
int location_print;
struct ui_out *uiout = current_uiout;
+ frame.prepare_reinflate ();
+
if (!current_uiout->is_mi_like_p ()
&& fp_opts.print_frame_info != print_frame_info_auto)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-10 16:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 16:34 [binutils-gdb] gdb: add missing prepare_reinflate call in print_frame_info Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).