This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: info frame ADDR internal error
- From: Daniel Jacobowitz <drow at false dot org>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 1 Feb 2009 13:34:24 -0500
- Subject: Re: info frame ADDR internal error
- References: <200901251635.30297.pedro@codesourcery.com> <20090125175925.GA7133@caradoc.them.org> <200901251944.32616.pedro@codesourcery.com>
On Sun, Jan 25, 2009 at 07:44:32PM +0000, Pedro Alves wrote:
> The new frame that create_new_frame created, isn't linked in the
> regular ( current_frame->... ) frame chain, it lives in its own chain,
> so this frame_find_by_id call isn't going to find it, unless you
> get lucky.
>
> This reinforces the bad things I was saying about create_new_frame.
>
> Any suggestions on how this could be fixed?
This is just gross. But yes, I see a way we could "fix" it. This
code is only reachable from select_frame and info frame. In the
former case, if we create a new frame we could clear the old frame
chain and set both current and selected frame to the new one;
in the latter case we'd have to clear the frame chain after info
frame was done, and restore the saved selected frame.
I do think this is somewhat useful, although being able to set
registers while debugging a core file would eliminate a lot of the
use...
--
Daniel Jacobowitz
CodeSourcery