This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB Remote debug: Why several "$Z0,address,length" msg when only set one breakpoint?
- From: Peng Fan <van dot freenix at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>, Yao Qi <yao at codesourcery dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Thu, 28 Aug 2014 09:20:55 +0800
- Subject: Re: GDB Remote debug: Why several "$Z0,address,length" msg when only set one breakpoint?
- Authentication-results: sourceware.org; auth=none
- References: <53FC2FC1 dot 9080600 at gmail dot com> <87mwaqixh2 dot fsf at codesourcery dot com> <53FD8D31 dot 9010507 at gmail dot com> <87d2bmgmil dot fsf at codesourcery dot com> <53FE547C dot 3030701 at redhat dot 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
>
- References:
- GDB Remote debug: Why several "$Z0,address,length" msg when only set one breakpoint?
- Re: GDB Remote debug: Why several "$Z0,address,length" msg when only set one breakpoint?
- Re: GDB Remote debug: Why several "$Z0,address,length" msg when only set one breakpoint?
- Re: GDB Remote debug: Why several "$Z0,address,length" msg when only set one breakpoint?
- Re: GDB Remote debug: Why several "$Z0,address,length" msg when only set one breakpoint?