This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: back trace issue
- From: Joel Brobecker <brobecker at adacore dot com>
- To: "nagaraju.m" <nagaraju dot m at redpinesignals dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 29 Apr 2009 09:01:37 -0700
- Subject: Re: back trace issue
- References: <49F7EF2B.4090805@redpinesignals.com>
> can you please suggest me where to provide the information to gdb so
> that "back trace" works properly.....
Typically, the [...]-tdep file for your architecture will provide
a set of routines that compute the value of a register in the caller's
frame (aka the "previous" frame) given a struct frame_info and and
its associated frame cache. Have a look at some of the -tdep.c files,
and search for "_prev_register", or "_this_id". That should give you
a few leads. I'll also mention that there is a new module in
prologue-value.[hc] that can simplify your job when doing prologue
analysis. I am mentioning it because it's relatively use a still
little used.
Also, if your target supports DWARF, you might also want to see if
the they produce CFI info, in which case a DWARF-based unwinder would
be able to compute your backtrace without requiring the prologue
analyzer. I can't remember the names of the routines but you'll need
to provide a gdbarch routine that converts a dwarf register number
into the associated GDB register number. And then hook in the dwarf
unwinder sniffers: dwarf2_append_unwinders. Again, have a look at
the various -tdep files.
--
Joel