Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kevin Pouget <kevin.pouget@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb@sourceware.org
Subject: Re: GDB and LD_PRELOAD library-call interception
Date: Thu, 31 Mar 2011 15:55:00 -0000	[thread overview]
Message-ID: <AANLkTin=EsGpK_NuqDZrNOpV4dzKCy_a68NHXwpvngDp@mail.gmail.com> (raw)
In-Reply-To: <m3oc4rmisd.fsf@fleche.redhat.com>

here is a link the the post:
http://sourceware.org/ml/gdb-patches/2009-05/msg00409.html

I was rather thinking about following the fork()s and exec()s (don't
really know much about tty and pts), so that instead of executing
> $shell -c $wrapper $bin

where GDB has to skip 2 or 3 'exec', we could do something like
> $shell -c xterm -e $bin
where GDB would skip 2 exec, and attach to the child forked by 'xterm'
(or equivalent).

in fact, it could look like an 'set fork-wrapper', because the
debuggee is not 'exec'ed, but forked

I'll give it a try, and come back on the thread if it seems to work
(one way or ther other)

Kevin

On Thu, Mar 31, 2011 at 5:06 PM, Tom Tromey <tromey@redhat.com> wrote:
>
> >>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:
>
> Kevin> I was wondering if there could be a way to hack this exec-wrapper to
> Kevin> launch for instance the executable in an xterm window?
>
> Thiago sent a patch a while back for this.  Look for "[RFC] patch to
> make GDB open a new terminal window for the inferior", on May 19 2009.
>
> I never tried it, but it seems like a decent idea.
>
> Tom


      reply	other threads:[~2011-03-31 15:55 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
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 [this message]

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='AANLkTin=EsGpK_NuqDZrNOpV4dzKCy_a68NHXwpvngDp@mail.gmail.com' \
    --to=kevin.pouget@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=tromey@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