This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB and LD_PRELOAD library-call interception
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Kevin Pouget <kevin dot pouget at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 31 Mar 2011 10:47:29 +0200
- Subject: Re: GDB and LD_PRELOAD library-call interception
- References: <AANLkTi=tESNe+Uj574gAQpiGXCX0ptM3ANsBWUOu+z+J@mail.gmail.com>
On Thu, 31 Mar 2011 10:25:17 +0200, Kevin Pouget wrote:
> it looks like if the library is loaded twice, without any control on
> the first load ('my_init' pending breakpoint is only resolved before
> the second execution)
See `set exec-wrapper', GDB runs a normal shell to process the startup, GDB
traps its first exec() call. Therefore LD_PRELOAD applies already on the
shell.
Regards,
Jan