This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Backtrace from kernel to user space in coredump
- From: "Paul Koning" <Paul_Koning at Dell dot com>
- To: FrÃdÃric RISS <frederic dot riss at gmail dot com>, "Michael Eager" <eager at eagerm dot com>
- Cc: <gdb at sourceware dot org>
- Date: Sat, 12 Jun 2010 12:16:49 -0400
- Subject: RE: Backtrace from kernel to user space in coredump
- References: <4C138642.2080202@eagerm.com> <1276355966.1798.3.camel@localhost.localdomain>
I've done just what you describe for MIPS, by adding a bunch of code to the prologue analyzers. The user space symbols are a bit of a hassle, not so much for the program itself (add-symbol-file is easy enough for that) but because of the shared libraries (if you have those -- in my case it was NetBSD so that did matter).
paul
> -----Original Message-----
> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On
> Behalf Of FrÃdÃric RISS
> Sent: Saturday, June 12, 2010 11:19 AM
> To: Michael Eager
> Cc: gdb@sourceware.org
> Subject: Re: Backtrace from kernel to user space in coredump
>
> Le samedi 12 juin 2010 Ã 06:06 -0700, Michael Eager a Ãcrit :
> > Are there better ways to do this? How have other
> > people handled traces back from kernel to user space?
>
> It's more heavyweight than just setting the registers, but it's quite
> easy to add specific unwinders for syscalls, exceptions, interrupts...
> And this works very nicely (well, the real difficulty is to have GDB
> load the debug information for the appropriate userspace task, but
> that's maybe not an issue in your case).
>
> Fred
>