From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10737 invoked by alias); 4 Jan 2012 07:17:25 -0000 Received: (qmail 10726 invoked by uid 22791); 4 Jan 2012 07:17:24 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Jan 2012 07:17:10 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 4B4C52BAE08; Wed, 4 Jan 2012 02:17:09 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3zAzy56aCO8k; Wed, 4 Jan 2012 02:17:09 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B1FAF2BAE04; Wed, 4 Jan 2012 02:17:08 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 34B88145615; Wed, 4 Jan 2012 11:16:58 +0400 (RET) Date: Wed, 04 Jan 2012 07:17:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: marc.khouzam@ericsson.com, gdb@sourceware.org Subject: Re: Pending breakpoints on lines that don't exist Message-ID: <20120104071658.GR2742@adacore.com> References: <20120104035128.GP2742@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2012-01/txt/msg00003.txt.bz2 > Not to me, FWIW. At the very least, we should have asked a different > question than we ask in the "normal" pending-breakpoint use case. I think we can look at this in the same context as Jan's general comment: It would be nice if GDB was a little more descriptive of what is happening, why it is doing what it is doing, propose explicit recipes for doing other things if this is not what the user wants, etc. It's a bit like what git often does. For instance (you do not have to real the whole output, it's just meant to show helpful git tries to be): | % git pull | You asked me to pull without telling me which branch you | want to merge with, and 'branch.private.merge' in | your configuration file does not tell me, either. Please | specify which branch you want to use on the command line and | try again (e.g. 'git pull '). | See git-pull(1) for details. | | If you often merge with the same branch, you may want to | use something like the following in your configuration file: | | [branch "private"] | remote = | merge = | | [remote ""] | url = | fetch = | | See git-config(1) for details. I kind of like the idea. But in this case, I think it would be too verbose. Currently, we have: (gdb) b foo.c:100 No line 100 in file "foo.c". Make breakpoint pending on future shared library load? (y or [n]) n I find that the error message is precise and complete. But I do not want to remove the option of making the breakpoint pending, because some users might have, in fact, meant what they were doing. And if the user made an error, do you think they would not understand what error they made that triggered the question? -- Joel