* GDB bt command and core dumps @ 2009-03-24 14:28 Amol Lad 2009-03-24 14:42 ` Daniel Jacobowitz 0 siblings, 1 reply; 4+ messages in thread From: Amol Lad @ 2009-03-24 14:28 UTC (permalink / raw) To: gdb 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) Thanks -- Amol Sent from: Bangalore KA India. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB bt command and core dumps 2009-03-24 14:28 GDB bt command and core dumps Amol Lad @ 2009-03-24 14:42 ` Daniel Jacobowitz 2009-03-25 7:12 ` Amol Lad 0 siblings, 1 reply; 4+ messages in thread From: Daniel Jacobowitz @ 2009-03-24 14:42 UTC (permalink / raw) To: Amol Lad; +Cc: gdb 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB bt command and core dumps 2009-03-24 14:42 ` Daniel Jacobowitz @ 2009-03-25 7:12 ` Amol Lad 2009-03-25 10:48 ` Amol Lad 0 siblings, 1 reply; 4+ messages in thread From: Amol Lad @ 2009-03-25 7:12 UTC (permalink / raw) To: Amol Lad, gdb It seems heap is also required. 0079c000-00d67000 rwxp 00763000 00:00 0 [heap] Executing gdb "bt" gives below error Cannot access memory at address 0xc975d0 "bt" is happy if above address range is also dumped. Any way to avoid dumping heap and this can grow subtantially Thanks On Tue, Mar 24, 2009 at 8:12 PM, Daniel Jacobowitz <drow@false.org> wrote: > 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 > -- Amol Sent from: Bangalore KA India. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB bt command and core dumps 2009-03-25 7:12 ` Amol Lad @ 2009-03-25 10:48 ` Amol Lad 0 siblings, 0 replies; 4+ messages in thread From: Amol Lad @ 2009-03-25 10:48 UTC (permalink / raw) To: Amol Lad, gdb Hi Daniel, Any clue how many bytes of heap should be dump for gdb "bt" to work ? Amol On Wed, Mar 25, 2009 at 12:42 PM, Amol Lad <amol.lad@gmail.com> wrote: > It seems heap is also required. > > 0079c000-00d67000 rwxp 00763000 00:00 0 [heap] > > Executing gdb "bt" gives below error > > Cannot access memory at address 0xc975d0 > > "bt" is happy if above address range is also dumped. Any way to avoid > dumping heap and this can grow subtantially > > Thanks > > On Tue, Mar 24, 2009 at 8:12 PM, Daniel Jacobowitz <drow@false.org> wrote: >> 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 >> > > > > -- > Amol > Sent from: Bangalore KA India. > -- Amol Sent from: Bangalore KA India. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-25 10:48 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-03-24 14:28 GDB bt command and core dumps Amol Lad 2009-03-24 14:42 ` Daniel Jacobowitz 2009-03-25 7:12 ` Amol Lad 2009-03-25 10:48 ` Amol Lad
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox