From: Tom Tromey <tom@tromey.com>
To: Bruno Larsen via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v4 5/5] gdb/frame: Add reinflation method for frame_info_ptr
Date: Fri, 07 Oct 2022 13:34:21 -0600 [thread overview]
Message-ID: <87wn9bsa0y.fsf@tromey.com> (raw)
In-Reply-To: <20220830100837.926692-6-blarsen@redhat.com> (Bruno Larsen via Gdb-patches's message of "Tue, 30 Aug 2022 12:08:37 +0200")
>>>>> "Bruno" == Bruno Larsen via Gdb-patches <gdb-patches@sourceware.org> writes:
Bruno> + /* Cache the frame_id that the pointer will use to reinflate. */
Bruno> + void prepare_reinflate ()
Bruno> + {
Bruno> + m_cached_id = get_frame_id(*this);
Missing space before the "(".
Bruno> + /* Use the cached frame_id to reinflate the pointer. */
Bruno> + void reinflate ()
Bruno> + {
Bruno> + gdb_assert (m_cached_id != null_frame_id);
Bruno> +
Bruno> + if(m_ptr == nullptr)
Here too.
Bruno> diff --git a/gdb/infcmd.c b/gdb/infcmd.c
Bruno> index d292a0e55bf..bc171d8818a 100644
Bruno> --- a/gdb/infcmd.c
Bruno> +++ b/gdb/infcmd.c
Bruno> @@ -1814,6 +1814,7 @@ finish_command (const char *arg, int from_tty)
Bruno> frame = get_prev_frame (get_selected_frame (_("No selected frame.")));
Bruno> if (frame == 0)
Bruno> error (_("\"finish\" not meaningful in the outermost frame."));
Bruno> + frame.prepare_reinflate ();
Bruno> clear_proceed_status (0);
Bruno> @@ -1872,6 +1873,7 @@ finish_command (const char *arg, int from_tty)
Bruno> print_stack_frame (get_selected_frame (NULL), 1, LOCATION, 0);
Bruno> }
Bruno> + frame.reinflate ();
I'm curious about this change. Did you add this to avoid a crash?
I.e., it's a latent bug of some kind?
Bruno> if (execution_direction == EXEC_REVERSE)
Bruno> finish_backward (sm);
Bruno> diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
Bruno> index f23559f886c..2c5bd2db96d 100644
Bruno> --- a/gdb/mi/mi-cmd-stack.c
Bruno> +++ b/gdb/mi/mi-cmd-stack.c
Bruno> @@ -39,6 +39,7 @@
Bruno> #include "inferior.h"
Bruno> #include "observable.h"
Bruno> +
Bruno> enum what_to_list { locals, arguments, all };
Spurious change.
Tom
next prev parent reply other threads:[~2022-10-07 19:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 10:08 [PATCH v4 0/5] Smart pointer wrapper for frame_info Bruno Larsen
2022-08-30 10:08 ` [PATCH v4 1/5] Remove frame_id_eq Bruno Larsen
2022-08-30 10:08 ` [PATCH v4 2/5] Introduce frame_info_ptr smart pointer class Bruno Larsen
2022-08-30 10:08 ` [PATCH v4 3/5] Change GDB to use frame_info_ptr Bruno Larsen
2022-08-30 10:08 ` [PATCH v4 4/5] Continue making GDB " Bruno Larsen
2022-08-30 10:08 ` [PATCH v4 5/5] gdb/frame: Add reinflation method for frame_info_ptr Bruno Larsen
2022-10-07 19:34 ` Tom Tromey [this message]
2022-10-10 7:54 ` Bruno Larsen
2022-10-11 7:58 ` Tom de Vries
2022-10-11 9:42 ` Bruno Larsen
2022-09-13 8:06 ` [Ping][PATCH v4 0/5] Smart pointer wrapper for frame_info Bruno Larsen
2022-09-21 15:39 ` [PINGv2][PATCH " Bruno Larsen
2022-09-29 7:01 ` [PINGv3][PATCH " Bruno Larsen
2022-10-05 9:58 ` [PINGv4][PATCH " Bruno Larsen
2022-10-07 19:35 ` Tom Tromey
2022-10-10 7:55 ` Bruno Larsen
2022-10-10 10:46 ` Tom de Vries
2022-10-10 12:04 ` Bruno Larsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wn9bsa0y.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).