From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20413 invoked by alias); 28 Aug 2014 01:21:20 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 20401 invoked by uid 89); 28 Aug 2014 01:21:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 28 Aug 2014 01:21:18 +0000 Received: by mail-pa0-f54.google.com with SMTP id fb1so312448pad.41 for ; Wed, 27 Aug 2014 18:21:17 -0700 (PDT) X-Received: by 10.68.103.4 with SMTP id fs4mr1034879pbb.58.1409188876969; Wed, 27 Aug 2014 18:21:16 -0700 (PDT) Received: from linux-jyl1.site ([123.151.195.1]) by mx.google.com with ESMTPSA id dn5sm1798982pbb.2.2014.08.27.18.21.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Aug 2014 18:21:15 -0700 (PDT) Message-ID: <53FE83F7.3040401@gmail.com> Date: Thu, 28 Aug 2014 01:21:00 -0000 From: Peng Fan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Pedro Alves , Yao Qi CC: "gdb@sourceware.org" Subject: Re: GDB Remote debug: Why several "$Z0,address,length" msg when only set one breakpoint? References: <53FC2FC1.9080600@gmail.com> <87mwaqixh2.fsf@codesourcery.com> <53FD8D31.9010507@gmail.com> <87d2bmgmil.fsf@codesourcery.com> <53FE547C.3030701@redhat.com> In-Reply-To: <53FE547C.3030701@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00132.txt.bz2 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 >