From: Yao Qi <yao@codesourcery.com>
To: gdb@sourceware.org
Subject: Re: GDB 7.2 gets SIGSEGV when step into a function in a shared library
Date: Thu, 15 Sep 2011 16:13:00 -0000 [thread overview]
Message-ID: <4E72241F.5060402@codesourcery.com> (raw)
In-Reply-To: <CAEU25Ca5F-cn4QEkWdMTH1Bdf9GNqbjmgZpeXqm+PbYiSMUidQ@mail.gmail.com>
On 09/15/2011 12:21 AM, Liang Cheng wrote:
> Hi,
>
> The application and library under debug were built for ARM. The
> target is running Android OS,
> and the host is Linux X86 64. As long as we try to step into the
> function xa_fun_in_lib, it would
> cause segmentation fault in gdb. Same thing happened if step the instructions.
>
> Here are the experiments I did for this issue, and some notes.
>
If you are reporting a problem of gdb, please describe the problem as
clear as possible. A clean and simple debug session is helpful for
other people here to understand what is your problem. Please don't mix
the experiments or your work in the problem description.
>
> So far I am stuck because of no idea why PC gets messed up. Anyone
> else the similar issue
> when trying to debug function in library? And any input to how to
> investigate gdb/gdbserver side
> also is appreciated. (below some other information is dumped).
>
Due to lack of clear steps you did in gdb, and its output, I have no
idea what the problem is and how do you get to the problem, except for
some wild guess,
> (gdb) disassemble /m 0x8d14
> Dump of assembler code for function main:
> ....
> 286 z = xa_fun_in_lib(10);
> => 0x00008d18<+84>: mov.w r0, #10
> 0x00008d1c<+88>: blx 0x8628
> 0x00008d20<+92>: mov r3, r0
> 0x00008d22<+94>: str r3, [r7, #44] ; 0x2c
How do you get SIGSEGV from here? I guess you typed `step' try to step
into xa_fun_in_lib, but get a SIGSEGV afterwards.
Last but not least, as Hui suggested, please try GDB 7.3 release or GDB
CVS trunk.
--
Yao (é½å°§)
next prev parent reply other threads:[~2011-09-15 16:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-14 16:21 Liang Cheng
2011-09-15 5:46 ` Hui Zhu
2011-09-15 16:13 ` Yao Qi [this message]
2011-09-15 16:39 ` Liang Cheng
2011-09-16 13:55 ` Yao Qi
[not found] ` <CAEU25CYOnYAdqO8ZjTVyUFf2uTHRv7OC6WKnFtGKWmjG4cdNgQ@mail.gmail.com>
2011-09-16 20:04 ` Liang Cheng
2011-09-17 1:28 ` Yao Qi
2011-09-19 15:57 ` Liang Cheng
2011-09-19 22:18 ` Liang Cheng
2011-09-20 1:07 ` Yao Qi
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=4E72241F.5060402@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).