This is the mail archive of the
mailing list for the Archer project.
Re: Improved linker-debugger interface
On Tue, May 31, 2011 at 12:46 PM, Tom Tromey <email@example.com> wrote:
> Gary> Is it possible for in-process debuggers to locate SystemTap probes?
> The probes are described in an non-allocated section, so IIUC they
> aren't mapped by ld.so. ?I guess a program could examine the executables
> and libraries it uses and map them itself.
Yes, the in-process debugger usually will try to open the ELF file (e.g. to
get to .debug_*, etc.), so it looks like locating the SystemTap probes
would work fine.
On Tue, May 31, 2011 at 9:24 AM, Gary Benson <firstname.lastname@example.org> wrote:
> Is making _dl_debug_state_extended an indirect call the only non-hacky
> way to allow in-process debuggers to get these notifications, or are
> there other possibilities?
Once the probe is located, the in-process debugger still has a problem:
not enough space to place a patch on (in-process debugger can not put a
breakpoint on the one instruction that is available).
Making the probes wider would be ideal.
> By the way, although _dl_debug_state compiles to a single ret, I think
> function entries are aligned so you might get a few more bytes to work
> with on some platforms.
I believe I've seen some *86 builds of glibc which did not align functions.