From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32143 invoked by alias); 24 Oct 2006 16:55:40 -0000 Received: (qmail 32123 invoked by uid 22791); 24 Oct 2006 16:55:38 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Oct 2006 16:55:34 +0000 Received: (qmail 20763 invoked from network); 24 Oct 2006 16:55:32 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 Oct 2006 16:55:32 -0000 To: grinthock Cc: gdb@sources.redhat.com Subject: Re: WeirdProcess runs in GDB but not natively References: <6965889.post@talk.nabble.com> From: Jim Blandy Date: Tue, 24 Oct 2006 16:55:00 -0000 In-Reply-To: <6965889.post@talk.nabble.com> (grinthock@gmail.com's message of "Mon, 23 Oct 2006 19:10:07 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00227.txt.bz2 grinthock writes: > Unsure if this is the perfect place to post this, if you know another > appropriate place please advise. > > I have a compiled app, when I attempt to run it with ./appname it fails with > an "ABORT TRAP" and i'm unsure of why. > > Someone suggested GDB, so I of course ran it with GDB ./process and then > RUN and the program runs. > > So why would a program run in GDB, but not natively? What's different? > > Thanks. (FYI, it's a Darwin on a PPC G5 PowerMAC) Generally GDB tries to disturb the program as little as possible. Ideally programs would always behave exactly the same way under GDB that they do otherwise. I couldn't say from what you've written here what's going on. I'm the opposite of a Darwin expert, though. Maybe the program is multi-threaded, and has a race condition, and its timing is being affected by GDB. If you have a program you can post that we could try out ourselves, that would be the most helpful thing.