This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unwind support for Linux 2.6 vsyscall DSO


Kevin Buettner wrote:
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.

History-man says, TARGET_CREATE_INFERIOR_HOOK was added in 1995, specifically to fork-child.c, to allow somebody to get control of the new child process just before execution of the first instruction. Seems like we would need a different hook for, say, attach.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]