From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25640 invoked by alias); 17 Apr 2009 17:32:44 -0000 Received: (qmail 25631 invoked by uid 22791); 17 Apr 2009 17:32:43 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from imr2.ericy.com (HELO imr2.ericy.com) (198.24.6.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Apr 2009 17:32:36 +0000 Received: from eusrcmw750.eamcs.ericsson.se (eusrcmw750.exu.ericsson.se [138.85.77.50]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id n3HHWYGo006094 for ; Fri, 17 Apr 2009 12:32:35 -0500 Received: from ecamlmw720.eamcs.ericsson.se ([142.133.1.72]) by eusrcmw750.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Fri, 17 Apr 2009 12:31:54 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Reporting proper line for breakpoints of non-executable lines (was: Re: RFC: preserve line number when skipping prologue) Date: Fri, 17 Apr 2009 17:40:00 -0000 Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA0748B502@ecamlmw720.eamcs.ericsson.se> From: "Marc Khouzam" To: X-IsSubscribed: yes 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: 2009-04/txt/msg00143.txt.bz2 I missed the original thread, I didn't notice the bit about "GDB reported the real line on which it was inserted" Please see below. > On Thu, 26 Mar 2009 15:49:49 -0700 Joel Brobeckerwrote: > > If I set a breakpoint on line 3, gdb reports line 7. > >=20 > > (gdb) b 3 > > Breakpoint 1 at 0x80483c5: file m.c, line 7. > >=20 > > But if I set one on line 9, another non-executable line, gdb reports > > line 9: > >=20 > > (gdb) b 9 > > Breakpoint 2 at 0x80483d1: file m.c, line 9. >=20 > I agree that we need to be consistent between the two cases! >=20 > I don't know which one I prefer, though. Actually, I think I would > prefer if GDB reported the real line on which it was inserted. But > that would be a change of behavior from before, and that could > have ramifications that could potentially annoys the users > (on the "clear" command, for instance). I think that from a frontend point-of-view, it would be much nicer to know where the real breakpoint was inserted. Right now, in Eclipse CDT, if I set a bp on a non-executable line, it will show as being set there, but the continue operation will stop on the next line (or whichever is the first executable line.) I think that is confusing. I found a report that GDB did not used to do this dating back to 2003 http://sourceware.org/ml/gdb/2003-08/msg00312.html but it seems to have died there. I also noticed that in MI in HEAD, there is a new field to the reply of break-insert which is "original-location" which was added for a=20 different reason http://sourceware.org/ml/gdb-patches/2008-04/msg00272.html But I was thinking it would be nice to use that field to show where the user set the bp, while showing where the bp was really set by GDB in the other fields. Do it make sense? Marc