From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5813 invoked by alias); 15 Aug 2002 05:57:25 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5513 invoked from network); 15 Aug 2002 05:57:22 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 15 Aug 2002 05:57:22 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 0B1613CA9 for ; Thu, 15 Aug 2002 01:57:14 -0400 (EDT) Message-ID: <3D5B42B9.6070201@ges.redhat.com> Date: Wed, 14 Aug 2002 22:57:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020810 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Re: [RFC] breakpoints and function prologues... References: <6AF1E816-A97C-11D6-B045-00039379E320@> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-08/txt/msg00361.txt.bz2 > I agree with Jim here. I think most folks are actually surprised to find that if they break on the "{" beginning a function (or indeed anywhere before the first executable line of code) then their backtrace will not be correct. Understanding why this is so requires you to "pay attention to the man behind the curtain", and that we breaks the illusion that source code maps straight-forwardly onto the running program. Where this extra knowledge is helpful (like when debugging optimized code) it is fine to require folks to have it. But here, where it really doesn't do any good, I think it is just confusing. And, of course, it causes big heartburn for GUIs the varobj code, as I said earlier. > > I doubt that "{" breaks on the prologue is a crucial feature of gdb, and given that there are other ways to do this, I don't think it is really worth supporting... Michael is right here. If a CLI user sets a breakpoint on a line (with code) then that user clearly wants the breakpoint set on that line. If an architecture can't unwind the frame for that breakpoint address then that is a bug in the architecture and/or GDB. The main reason the average prologue analyzer doesn't handle breakpoints in the prologue is, I think, more a factor of not being tested then of being ``hard''. Andrew > On Saturday, August 3, 2002, at 10:32 PM, gdb-patches-digest-help@sources.redhat.com wrote: > > From: Jim Blandy > Date: Fri Aug 2, 2002 11:48:26 PM US/Pacific > To: Michael Snyder > Cc: Joel Brobecker , gdb-patches@sources.redhat.com > Subject: Re: [RFC] breakpoints and function prologues... > > > > Michael Snyder writes: > So I'd support changing `break LINENO' to always skip the prologue. > > I would not. It's changing a behavior that people have > become accustomed to. > > Well, that alone isn't a good reason to keep a behavior, is it? I > mean, it's pretty confusing. And there's a good alternative. > > > > -- > Jim Ingham jingham@apple.com > Developer Tools - gdb > Apple Computer > >