From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27408 invoked by alias); 4 Jan 2012 14:28:58 -0000 Received: (qmail 27399 invoked by uid 22791); 4 Jan 2012 14:28:57 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Jan 2012 14:28:42 +0000 Received: from relay1.suse.de (nat.nue.novell.com [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 151FE89471; Wed, 4 Jan 2012 15:28:40 +0100 (CET) Date: Wed, 04 Jan 2012 14:28:00 -0000 From: Richard Guenther To: gdb@sourceware.org Cc: brobecker@adacore.com Subject: Re: Pending breakpoints on lines that don't exist Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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/msg00006.txt.bz2 [sorry for breaking threading, I'm not subscribed] > 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 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? OTOH what mostly happens to me is: > gdb ./cc1 GNU gdb (GDB) SUSE (7.3-98.1) ... (gdb) b expr.c:10850 No line 10850 in file "/space/rguenther/src/svn/trunk/libcpp/expr.c". because I meant /space/rguenther/src/svn/trunk/gcc/expr.c! Now getting the pending breakpoing seems to be even worse. I'd expect sth like (gdb) b expr.c:10850 No line 10850 in file "/space/rguenther/src/svn/trunk/libcpp/expr.c" Use alternate source file /space/rguenther/src/svn/trunk/gcc/expr.c? (y or [n]) it's especially bad that gdb does not recognize (gdb) b gcc/expr.c:10850 but requires a full path (bah). No idea if this improved for gdb 7.4 though. Richard.