From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19585 invoked by alias); 31 Mar 2011 15:55:29 -0000 Received: (qmail 19573 invoked by uid 22791); 31 Mar 2011 15:55:27 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Mar 2011 15:55:23 +0000 Received: by vws4 with SMTP id 4so2548196vws.0 for ; Thu, 31 Mar 2011 08:55:22 -0700 (PDT) Received: by 10.220.193.193 with SMTP id dv1mr752641vcb.97.1301586922180; Thu, 31 Mar 2011 08:55:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.200.3 with HTTP; Thu, 31 Mar 2011 08:55:02 -0700 (PDT) In-Reply-To: References: <20110331084729.GA29683@host1.jankratochvil.net> From: Kevin Pouget Date: Thu, 31 Mar 2011 15:55:00 -0000 Message-ID: Subject: Re: GDB and LD_PRELOAD library-call interception To: Tom Tromey Cc: Jan Kratochvil , gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00216.txt.bz2 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 wrote: > > >>>>> "Kevin" =3D=3D Kevin Pouget 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. =A0Look 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