From: Kevin Pouget <kevin.pouget@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: GDB and LD_PRELOAD library-call interception
Date: Thu, 31 Mar 2011 09:47:00 -0000 [thread overview]
Message-ID: <AANLkTimPAd3v2x=G5PVkzB0Jk_V9i2Zw-=vGMJPLTxWT@mail.gmail.com> (raw)
In-Reply-To: <20110331084729.GA29683@host1.jankratochvil.net>
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
>
next prev parent reply other threads:[~2011-03-31 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 8:25 Kevin Pouget
2011-03-31 8:47 ` Jan Kratochvil
2011-03-31 9:47 ` Kevin Pouget [this message]
2011-03-31 12:16 ` Jan Kratochvil
2011-03-31 15:07 ` Tom Tromey
2011-04-03 16:54 ` Xavier de Gaye
[not found] ` <BANLkTi=j6+-85R4B+N1Nd5kb9bkEZfsT9A@mail.gmail.com>
2011-04-04 13:35 ` Kevin Pouget
2011-03-31 15:06 ` Tom Tromey
2011-03-31 15:55 ` Kevin Pouget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTimPAd3v2x=G5PVkzB0Jk_V9i2Zw-=vGMJPLTxWT@mail.gmail.com' \
--to=kevin.pouget@gmail.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox