Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Marc Khouzam" <marc.khouzam@ericsson.com>
To: <gdb@sourceware.org>
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	[thread overview]
Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA0748B502@ecamlmw720.eamcs.ericsson.se> (raw)

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.
> > 
> > (gdb) b 3
> > Breakpoint 1 at 0x80483c5: file m.c, line 7.
> > 
> > But if I set one on line 9, another non-executable line, gdb reports
> > line 9:
> > 
> > (gdb) b 9
> > Breakpoint 2 at 0x80483d1: file m.c, line 9.
> 
> I agree that we need to be consistent between the two cases!
> 
> 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 
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


             reply	other threads:[~2009-04-17 17:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 17:40 Marc Khouzam [this message]
2009-04-17 23:00 ` Reporting proper line for breakpoints of non-executable lines Tom Tromey
2009-04-18  3:33 ` Reporting proper line for breakpoints of non-executable lines (was: Re: RFC: preserve line number when skipping prologue) Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6D19CA8D71C89C43A057926FE0D4ADAA0748B502@ecamlmw720.eamcs.ericsson.se \
    --to=marc.khouzam@ericsson.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox