From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7607 invoked by alias); 26 Mar 2009 23:18:29 -0000 Received: (qmail 7597 invoked by uid 22791); 26 Mar 2009 23:18:28 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Mar 2009 23:18:22 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n2QNHweV021742; Thu, 26 Mar 2009 19:17:58 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2QNHp7T020290; Thu, 26 Mar 2009 19:17:51 -0400 Received: from opsy.redhat.com (vpn-12-186.rdu.redhat.com [10.11.12.186]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2QNHux6025912; Thu, 26 Mar 2009 19:17:57 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 3F33F3780FB; Thu, 26 Mar 2009 17:17:54 -0600 (MDT) To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: RFC: preserve line number when skipping prologue References: <20090326224949.GM9472@adacore.com> From: Tom Tromey Reply-To: Tom Tromey Date: Thu, 26 Mar 2009 23:45:00 -0000 In-Reply-To: <20090326224949.GM9472@adacore.com> (Joel Brobecker's message of "Thu\, 26 Mar 2009 15\:49\:49 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-03/txt/msg00604.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Tom> (gdb) b 3 Tom> Breakpoint 1 at 0x80483c5: file m.c, line 7. Tom> (gdb) b 9 Tom> Breakpoint 2 at 0x80483d1: file m.c, line 9. Joel> I agree that we need to be consistent between the two cases! Joel> I don't know which one I prefer, though. Actually, I think I would Joel> prefer if GDB reported the real line on which it was inserted. But Joel> that would be a change of behavior from before, and that could Joel> have ramifications that could potentially annoys the users Joel> (on the "clear" command, for instance). Yeah, I think there are reasons to want both. On the one hand, the line number you asked for is used if the breakpoint ever needs to be reset. So, it is relevant. On the other hand, seeing where the breakpoint actually ends up is also useful, because that tells you what is actually happening at the moment. Perhaps we could emit: (gdb) b 3 Breakpoint 1 at 0x80483c5: file m.c, line 3. (Line 3 is not executable; actually set at line 7.) This is probably not relevant for GUIs. Joel> So I think that your patch is the most reasonable approach Ok, I'm going to check it in. Thanks for looking at this. Tom