This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: unwind support for Linux 2.6 vsyscall DSO
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Roland McGrath <roland at redhat dot com>, Jim Blandy <jimb at redhat dot com>
- Cc: Daniel Jacobowitz <drow at mvista dot com>, Kevin Buettner <kevinb at redhat dot com>, Elena Zannoni <ezannoni at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Thu, 9 Oct 2003 15:49:36 -0700
- Subject: Re: unwind support for Linux 2.6 vsyscall DSO
- References: <200310092220.h99MKXvN010506@magilla.sf.frob.com>
On Oct 9, 3:20pm, Roland McGrath wrote:
> Kevin says:
> > I think that's what TARGET_CREATE_INFERIOR_HOOK is for.
>
> This is only called in the "run" case. There is also
> SOLIB_CREATE_INFERIOR_HOOK, but that is called only in the "run", "target
> remote", and follow-exec cases AFAICT.
>
> To reiterate, we need something that is called at the break-on-exec from
> run, immediately after attach, immediately after loading a core file, and
> after follow-exec breaks if that support is real.
It may be possible that the existing mechanisms (either
TARGET_CREATE_INFERIOR_HOOK or SOLIB_CREATE_INFERIOR_HOOK) are
adequate, but simply not called from enough places. If these
must stay as they are, then we need some new hooks. These days,
we normally set these up as gdbarch methods. For linux, such a
method could be registered in the $arch-linux-tdep.c file.
> We also need to clear out the state that hook will set up. clear_solib
> seems to be called at a reasonable time on the next "run", though only
> SOLIB_RESTART is called in the follow-exec case and I'm not sure if
> anything helpful is called to reset state before a new "attach".
>
> The hooks I need are "we've just seen a new address space for the first
> time" and "scratch that, the address space is gone". I suppose actually
> just the one suffices if it's never called extra times, so it just clears
> the old and fetches the new every time.
I think I had better go back and read past discussion.
Kevin