From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7408 invoked by alias); 24 Mar 2009 14:42:31 -0000 Received: (qmail 7398 invoked by uid 22791); 24 Mar 2009 14:42:31 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Mar 2009 14:42:24 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 903401018A; Tue, 24 Mar 2009 14:42:21 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 6E63E10183; Tue, 24 Mar 2009 14:42:21 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Lm7pb-0007dp-LD; Tue, 24 Mar 2009 10:42:19 -0400 Date: Tue, 24 Mar 2009 14:42:00 -0000 From: Daniel Jacobowitz To: Amol Lad Cc: gdb@sourceware.org Subject: Re: GDB bt command and core dumps Message-ID: <20090324144219.GA28663@caradoc.them.org> Mail-Followup-To: Amol Lad , gdb@sourceware.org References: <8c675e9b0903240728i7e044580yae1deff480b3ffc9@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8c675e9b0903240728i7e044580yae1deff480b3ffc9@mail.gmail.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2009-03/txt/msg00140.txt.bz2 On Tue, Mar 24, 2009 at 07:58:18PM +0530, Amol Lad wrote: > Hi, > > I'm working on an ARM9 platform (running Linux 2.6.18) and using gdb > 6.6 compiled for the platform. My application is a multithreaded > application and on a crash it generates core of around 200MByte. I'm > looking to reduce the size of the core file and I _only_ need gdb 'bt' > command output ; no other debugging information (i.e I'm only > interested in the call trace) > > - I tried ulimit -c command but the core produced are not useful in most cases > - I changed kernels fs/binfmt_elf.c file and modified maydump function > to just add crashed thread's stack in the core but no success > > What all information should be present in the core file so that bt > output works reliably. Is stack of crashed thread not enough ? My > application is compiled with -O2 (hence -fomit-frame-pointer) You'll probably need the dynamic section, too - that's what GDB uses to locate shared libraries. I thought there was already a way to do this, but I can't find it. Stack and modified private copies of file pages should approximate this, i.e. the data segment but not the heap. -- Daniel Jacobowitz CodeSourcery