This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Have block_innermost_frame start from selected frame
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Paul Hilfinger <Hilfinger at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 28 Dec 2011 14:09:59 +0100
- Subject: Re: [RFA] Have block_innermost_frame start from selected frame
- References: <20111227195809.672D892BF6@kwai.gnat.com>
On Tue, 27 Dec 2011 20:58:09 +0100, Paul Hilfinger wrote:
> --- a/gdb/blockframe.c
> +++ b/gdb/blockframe.c
> @@ -370,7 +370,9 @@ block_innermost_frame (const struct block *block)
> start = BLOCK_START (block);
> end = BLOCK_END (block);
>
> - frame = get_current_frame ();
> + frame = get_selected_frame_if_set ();
> + if (frame == NULL)
> + frame = get_current_frame ();
And the comment of this function is no longer valid then:
/* Return the innermost stack frame executing inside of BLOCK, or NULL
if there is no such frame. If BLOCK is NULL, just return NULL. */
struct frame_info *
block_innermost_frame (const struct block *block)
Regards,
Jan