From: Yao Qi <yao@codesourcery.com>
To: Liang Cheng <liang.cheng555@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: GDB 7.2 gets SIGSEGV when step into a function in a shared library
Date: Fri, 16 Sep 2011 13:55:00 -0000 [thread overview]
Message-ID: <4E735536.1000405@codesourcery.com> (raw)
In-Reply-To: <CAEU25Cbxdzg19W4ooh7HjGrfBK9v=+CptaWabUUQcbk+MQn0-Q@mail.gmail.com>
On 09/16/2011 12:39 AM, Liang Cheng wrote:
> Sorry for not being clear.
> Here is the debug session getting SIGSEGV. xa_fun_in_lib is the
> function defined in shared library, and its symbols has been found by
> gdb. Step instruction also caused the same issue. The reason that I
> attach those disassemble dump is to avoid rounds of ask-give. Let me
> know if disassemble of the piece of code is needed. Any idea of why
> it happens?
>
This debug session is much clear than last one. Thanks.
> Breakpoint 1, main (argc=1, argv=0xbef25ca4) at vendor/altestavplayback.c:284
> 284 CheckErr(res);
> 3: x/i $pc
> => 0x8d12 <main+78>: ldr r0, [r7, #52] ; 0x34
> (gdb) n
> 286 z = xa_fun_in_lib(10);
> 3: x/i $pc
> => 0x8d18 <main+84>: mov.w r0, #10
> (gdb) s
>
Before you run `step', turn on some debug output first. Like this `set
debug infrun 1'. Then, when you run `step', you can see some debug
output, which will show how PC is changed and events inferior gets
during command `step'.
However, before we go into the details of debug output, could you check
whether GDB cvs trunk works or not. You just have to build gdb for arm,
and I think GDB cvs trunk should be able to work with your 7.2 gdbserver.
> Program received signal SIGSEGV, Segmentation fault.
> 0x00008d22 in main (argc=1, argv=0xbef25ca4) at vendor/altestavplayback.c:286
> 286 z = xa_fun_in_lib(10);
> 3: x/i $pc
> => 0x8d22 <main+94>: str r3, [r7, #44] ; 0x2c
> (gdb) info address xa_fun_in_lib
> Symbol "xa_fun_in_lib(int)" is a function at address 0x800036fc.
>
> On Thu, Sep 15, 2011 at 11:13 AM, Yao Qi <yao@codesourcery.com> wrote:
>> On 09/15/2011 12:21 AM, Liang Cheng wrote:
--
Yao (é½å°§)
next prev parent reply other threads:[~2011-09-16 13:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-14 16:21 Liang Cheng
2011-09-15 5:46 ` Hui Zhu
[not found] ` <4E72241F.5060402@codesourcery.com>
2011-09-15 16:39 ` Liang Cheng
2011-09-16 13:55 ` Yao Qi [this message]
[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=4E735536.1000405@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=liang.cheng555@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