This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Extend debugglibc.sh to handle static, static PIE, and container tests?
- From: "Gabriel F. T. Gomes" <gabriel at inconstante dot net dot br>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Arjun Shankar <ashankar at redhat dot com>, libc-alpha <libc-alpha at sourceware dot org>, DJ Delorie <dj at redhat dot com>
- Date: Tue, 26 Nov 2019 18:52:16 -0300
- Subject: Re: Extend debugglibc.sh to handle static, static PIE, and container tests?
- References: <9319d3d5-819f-7bd6-7926-ef00de570a35@redhat.com>
On Tue, 26 Nov 2019, Carlos O'Donell wrote:
>I love the new debugglibc.sh script. It really makes my life easier
>when doing certain operations and helping people.
Hurray!
>Any way we can extend this script to support static, and static PIE?
>Detecting either of these means we can just launch the debugger against
>the binary itself without indirecting through the loader which causes
>problems (it doesn't debug properly because loading a static binary
>from ld.so doesn't work).
If I understood it correctly, you would like to be able to use all other
features of the debugglibc.sh script, except for the setup of the
--library-path argument and the loading from ld.so, right?
Regarding libpthread_db, it seems that the auto-loading done for the
shared case is also valid for static. Is that your understanding, too?
Regarding the fact that debugglibc.sh always adds a breakpoint at
_dl_start_user, that won't work for static. I wonder if this should be
replaced, for the static case, with some other symbol, e.g.
__libc_start_main, or it if this should simply be removed (specially,
since people can use -b anyway).