From: Peng Fan <van.freenix@gmail.com>
To: Pedro Alves <palves@redhat.com>, Yao Qi <yao@codesourcery.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: GDB Remote debug: Why several "$Z0,address,length" msg when only set one breakpoint?
Date: Thu, 28 Aug 2014 01:21:00 -0000 [thread overview]
Message-ID: <53FE83F7.3040401@gmail.com> (raw)
In-Reply-To: <53FE547C.3030701@redhat.com>
On 08/28/2014 05:58 AM, Pedro Alves wrote:
> On 08/27/2014 01:11 PM, Yao Qi wrote:
>
>> GDB is interested in entry address, but I don't know why GDB insert
>> breakpoint there. In GDB, command 'maintenance info breakpoints' can
>> list all the user breakpoints and internal breakpoints. If it still
>> doesn't help, you can debug your gdb, set breakpoint
>> remote_insert_breakpoint, and check why the breakpoint is inserted at
>> 0x87800000.
>
Breakpoint 1, do_bootz (cmdtp=0x8784cbc4 <_u_boot_list_2_cmd_2_bootz>, flag=0,
argc=1, argv=0xbf552a20) at common/cmd_bootm.c:1928
1928 {
(gdb) maintenance info breakpoints
Num Type Disp Enb Address What
-1 shlib events keep y 0x87800000 <_start> inf 1
1 breakpoint keep y 0x87809580 in do_bootz
at common/cmd_bootm.c:1928 inf 1
breakpoint already hit 2 times
> I'd guess this is a build of GDB targeting Linux, and then that
> breakpoint is the solib-event breakpoint. One of the
> last-resort addresses solib-svr4.c tries is _start:
>
> static const char * const bkpt_names[] =
> {
> "_start",
> ...
>
$arm-poky-linux-gnueabi-nm u-boot |grep start
87899130 B NetRestartWrap
87899094 b NetRestarted
8784d35c B __bss_start
87800000 T __image_copy_start
8784d35c D __rel_dyn_start
87800000 T _start
Yeah. I just objdump the elf file, but not `nm`. symbol __image_copy_start and __start both point to 0x87800000.
Thanks all.
Regards,
Peng.
> Thanks,
> Pedro Alves
>
prev parent reply other threads:[~2014-08-28 1:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 6:57 Peng Fan
2014-08-26 13:18 ` Luis Machado
2014-08-27 0:36 ` Yao Qi
2014-08-27 7:50 ` Peng Fan
2014-08-27 12:15 ` Yao Qi
2014-08-27 21:58 ` Pedro Alves
2014-08-28 1:21 ` Peng Fan [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=53FE83F7.3040401@gmail.com \
--to=van.freenix@gmail.com \
--cc=gdb@sourceware.org \
--cc=palves@redhat.com \
--cc=yao@codesourcery.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