This is the mail archive of the gdb@sourceware.org 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: GDB and LD_PRELOAD library-call interception


oh yes, thanks, that's an interesting command !

I was wondering if there could be a way to hack this exec-wrapper to
launch for instance the executable in an xterm window?
personally, I don't like debugging GDB with GDB from a single
terminal, so I need to do a pid-attach; "set exec-wrapper xterm" would
be very conveniant for any console-based interactive program, I guess

but it it possible to follow easily (two) forks?
let me know if you think that the idea is interesting / feasible


Cordially,

Kevin

On Thu, Mar 31, 2011 at 4:47 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> 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
>


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