From: Joel Brobecker <brobecker@adacore.com>
To: "nagaraju.m" <nagaraju.m@redpinesignals.com>
Cc: gdb@sourceware.org
Subject: Re: back trace issue
Date: Wed, 29 Apr 2009 17:01:00 -0000 [thread overview]
Message-ID: <20090429160137.GE23979@adacore.com> (raw)
In-Reply-To: <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
next prev parent reply other threads:[~2009-04-29 16:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 7:53 nagaraju.m
2009-04-29 17:01 ` Joel Brobecker [this message]
[not found] ` <49FC0D86.6090809@redpinesignals.com>
2009-05-04 16:56 ` Joel Brobecker
2009-04-29 18:29 ` Anthony Berent
2009-05-02 9:21 nagaraju.m
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090429160137.GE23979@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=nagaraju.m@redpinesignals.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox