From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7287 invoked by alias); 1 Jul 2008 04:41:13 -0000 Received: (qmail 7277 invoked by uid 22791); 1 Jul 2008 04:41:13 -0000 X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.173) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 01 Jul 2008 04:40:55 +0000 Received: by wf-out-1314.google.com with SMTP id 28so1799152wfc.24 for ; Mon, 30 Jun 2008 21:40:54 -0700 (PDT) Received: by 10.142.253.21 with SMTP id a21mr2251417wfi.254.1214887254210; Mon, 30 Jun 2008 21:40:54 -0700 (PDT) Received: by 10.142.135.12 with HTTP; Mon, 30 Jun 2008 21:40:54 -0700 (PDT) Message-ID: <705543260806302140t1bc8c568wea5175b9cc728e53@mail.gmail.com> Date: Tue, 01 Jul 2008 04:41:00 -0000 From: "Justin Ferguson" To: gdb@sourceware.org Subject: following execve() MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: 2008-07/txt/msg00002.txt.bz2 Hi, What is the suggested method for following an execve() in an application? I seem to remember I used to get a sigtrap, but not so much anymore-- googling around I see that it looks like using tcatch exec/cont/tbreak main is supposed to work, naturally it does not, the break in main attempts to break in the original applications context, and then it fails to be able to really do much of anything (presumably) due to not properly attaching to the new process and not being able to access it's memory. Then stack corruption occurs in the target application, which causes gdb to just hang and requires me to kill -9 it. So how exactly am I supposed to do this?