From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23324 invoked by alias); 28 Apr 2006 20:58:48 -0000 Received: (qmail 23316 invoked by uid 22791); 28 Apr 2006 20:58:48 -0000 X-Spam-Check-By: sourceware.org Received: from xproxy.gmail.com (HELO xproxy.gmail.com) (66.249.82.193) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Apr 2006 20:58:46 +0000 Received: by xproxy.gmail.com with SMTP id h29so1396209wxd for ; Fri, 28 Apr 2006 13:58:44 -0700 (PDT) Received: by 10.70.126.2 with SMTP id y2mr541917wxc; Fri, 28 Apr 2006 13:58:39 -0700 (PDT) Received: by 10.70.129.13 with HTTP; Fri, 28 Apr 2006 13:58:39 -0700 (PDT) Message-ID: <8f2776cb0604281358x2f667d00s90e03051f034b91c@mail.gmail.com> Date: Fri, 28 Apr 2006 20:58:00 -0000 From: "Jim Blandy" To: "Mark Kettenis" Subject: Re: [RFC/RFA/i386] pb reading insns if breakpoints still inserted Cc: brobecker@adacore.com, gdb-patches@sources.redhat.com In-Reply-To: <200604281839.k3SIdfsq030892@elgar.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060428171154.GP17613@adacore.com> <8f2776cb0604281054y116acfdavc3649dd8198d80d0@mail.gmail.com> <200604281839.k3SIdfsq030892@elgar.sibelius.xs4all.nl> X-Google-Sender-Auth: 65929bac330f0e47 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00373.txt.bz2 On 4/28/06, Mark Kettenis wrote: > I don't completely disagree with you here, but, a different way to > view the problem is putting the blame with the fact that we (ab)use > the prologue analyzer for skipping the prologue when trying to place a > breakpoint at the start of a function, where we really should be able > to use the debug info for doing this. I certainly agree that debug info is preferable to pig-nosing through machine code. Perhaps there should be generic code that does what find_function_start_sal does, and everybody should be using that instead of calling SKIP_PROLOGUE directly. But sometimes we don't have debugging information. I had thought that prologue analysis was pretty much dead, given that .debug_frame does a much better job, and puts the problem in the hands of somebody who can solve it (the compiler). But it still seems to come up fairly often. The other argument is just from first principles: dad gum it, even if we only know the object file, we should be able to read its instructions. If the user has said "break foo" and we're not going to give an error message or mark it pending on shared library load, then that means we're alleging we know what "foo" refers to. So we should be able to look at its code.