From: Yao Qi <qiyaoltc@gmail.com>
To: Sundar Dev <sundarjdevml@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: [ARM][GDB] backtrace does not go beyond libc functions
Date: Mon, 29 Jun 2015 09:31:00 -0000 [thread overview]
Message-ID: <86y4j2q2sz.fsf@gmail.com> (raw)
In-Reply-To: <CAHOCAJYDEs-E2mReG5psMmDX96gNB0XjhGP4=0rpOhXM2Kyd_Q@mail.gmail.com> (Sundar Dev's message of "Fri, 26 Jun 2015 18:35:23 -0700")
Sundar Dev <sundarjdevml@gmail.com> writes:
> function like poll(), read(), etc., and I attach a remote gdbserver to
> the process and try to get backtrace, all I see is the following 4
> backtrace frames as shown below-
> (gdb) bt
> #0 0x758b9190 in poll () from /lib/libc.so.6
> #1 0x758b9184 in poll () from /lib/libc.so.6
> #2 0x013df120 in ?? ()
> #3 0x013df120 in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>
> And address 0x013df120 is in the heap region in proc/<pid>/maps (shown
> below) of my process-
> root@xyz# cat /proc/621/maps
> ...<snip>...
> 01389000-0154e000 rw-p 00000000 00:00 0 [heap]
> ...<snip>...
>
The address 0x013df120 in frame #2 is got from frame #1 by unwinding.
The unwinding can be wrong, so address 0x013df120 can be wrong too.
> I've looked at gdb source code and I know that the version of gdb that I'm using
> (7.6.2) has support to backtrace using ARM unwind tables and frame
> pointers (see [1] and [2]). But, even then, all I get from GDB
> backtrace is the above shown output. Does anybody here have any
> comments and/or suggestions?
I don't have much suggestions to give, unless I can reproduce it. GDB
tries different unwinders to unwind a certain frame, which means
exception table unwinder may be used or may not be used. You can debug
GDB to see which unwinder is used, and identify why the bad pc
(0x013df120) is got from the unwinding.
--
Yao (齐尧)
prev parent reply other threads:[~2015-06-29 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-27 1:35 Sundar Dev
2015-06-29 9:31 ` Yao Qi [this message]
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=86y4j2q2sz.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=gdb@sourceware.org \
--cc=sundarjdevml@gmail.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