From: Bruno Larsen <blarsen@redhat.com>
To: Tom Tromey <tom@tromey.com>,
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: Mon, 10 Oct 2022 09:54:02 +0200 [thread overview]
Message-ID: <8844735c-672c-fa3a-49fc-ea0a4f803107@redhat.com> (raw)
In-Reply-To: <87wn9bsa0y.fsf@tromey.com>
On 07/10/2022 21:34, Tom Tromey wrote:
>>>>>> "Bruno" == Bruno Larsen via Gdb-patches <gdb-patches@sourceware.org> writes:
> ...
>
> 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?
This is one of the triggers for bug python/28856
(https://sourceware.org/bugzilla/show_bug.cgi?id=28856), but a quick
recap: If one of the arguments of the function has a pretty printer that
calls a function from the inferior, frame becomes stale and finish breaks.
That bug was the original reason I started this series, lol.
Cheers,
Bruno
>
> 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-10 7:54 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
2022-10-10 7:54 ` Bruno Larsen [this message]
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=8844735c-672c-fa3a-49fc-ea0a4f803107@redhat.com \
--to=blarsen@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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).