From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20736 invoked by alias); 29 Jun 2011 10:00:39 -0000 Received: (qmail 20727 invoked by uid 22791); 29 Jun 2011 10:00:38 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Jun 2011 10:00:21 +0000 Received: (qmail 29912 invoked from network); 29 Jun 2011 10:00:16 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 29 Jun 2011 10:00:16 -0000 Message-ID: <4E0AF7A6.1040800@codesourcery.com> Date: Wed, 29 Jun 2011 10:00:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Terry Guo CC: "gdb-patches@sourceware.org" , "pedro@codesourcery.com" Subject: Re: [PATCH] Fix that different function breakpoints are set at same pc address (PR gdb/12703) References: <000901cc34bc$fd1aa6a0$f74ff3e0$@guo@arm.com> <000101cc35fb$8d45ff60$a7d1fe20$@guo@arm.com> <4E0AB9B3.8060104@codesourcery.com> <000501cc362a$2e7f9020$8b7eb060$@guo@arm.com> <4E0ADB87.20807@codesourcery.com> <45520D6299C11E4588128526465332BB0D0C8B1246@SAROVARA.Asiapac.Arm.com> In-Reply-To: <45520D6299C11E4588128526465332BB0D0C8B1246@SAROVARA.Asiapac.Arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/msg00439.txt.bz2 On 06/29/2011 04:47 PM, Terry Guo wrote: > Hi, > > First if you look at the generated binary code, I thought it is a valid case. After performing the function test, it will fall into function bar which is a normal function. At least my case can run correctly on QEMU. It is very likely for people to write program in assembly code like: > > main: > b test > > test: > movs r5, #10 > bar: > push....... > ......... > We are lucky here GCC places bar next to function test physically, but gcc may also place function test and bar in other layout, like main: b test bar: push ... test: moves r5, #10 After test, processor will run some instructions that we don't know. IMO, it is incorrect. > You cannot say this is a invalid program. If you have concern about attribute NAKED, I can rewrite it in assembly code. > I have no concern on attribute NAKED here. > Second, we all know that current prologue analyzer cannot handle all cases. My patch only intends to be a worthwhile supplement for cases that beyond the prologue analyzer capability. > > Third, I also have strong interesting to enhance prologue analyze. I suggest we use another thread to discuss how to enhance prologue analyzer to handle all possible cases. And leave this one to discuss whether is it worthwhile to have my patch. OK, thanks for your clarification. If you think your test case is correct, please send the patch again, and the right people can review/approve your patch. -- Yao (齐尧) P.S. 1. could you please set up your mail client to newline your mail automatically? It is hard to read one paragraph in one line. 2. could you reply mail with quoted context?