From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16571 invoked by alias); 29 Jun 2011 07:00:35 -0000 Received: (qmail 16545 invoked by uid 22791); 29 Jun 2011 07:00:33 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Wed, 29 Jun 2011 07:00:19 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 29 Jun 2011 08:00:16 +0100 Received: from Terrysh02 ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 29 Jun 2011 08:00:12 +0100 From: "Terry Guo" To: "'Yao Qi'" Cc: , References: <000901cc34bc$fd1aa6a0$f74ff3e0$@guo@arm.com> <000101cc35fb$8d45ff60$a7d1fe20$@guo@arm.com> <4E0AB9B3.8060104@codesourcery.com> In-Reply-To: <4E0AB9B3.8060104@codesourcery.com> Subject: RE: [PATCH] Fix that different function breakpoints are set at same pc address (PR gdb/12703) Date: Wed, 29 Jun 2011 07:00:00 -0000 Message-ID: <000501cc362a$2e7f9020$8b7eb060$@guo@arm.com> MIME-Version: 1.0 X-MC-Unique: 111062908001602201 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00436.txt.bz2 Hi, Here is my case. As for stack backtrace, I wonder whether it works for the = function that only contains one single instruction and function that doesn'= t even has a valid prologue. I also saw that current prologue analyzer cann= ot handle all cases, so I try to avoid this in a more general way. unsigned long _etext; unsigned long _data; unsigned long _edata; register unsigned long guard asm("r5"); void bar (void); void test (void) __attribute__((naked)); void foo (void) { while(1) { } } /* End of function foo. */ void test (void) { guard =3D 10; } void bar (void) { unsigned long *pulSrc, *pulDest; pulSrc =3D &_etext; for (pulDest =3D &_data; pulDest < &_edata;) { *pulDest++ =3D *pulSrc++; } if (*pulSrc > guard) guard =3D 0; else guard =3D 1; } void main (int argc, char **argv) { test (); }