Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Reporting proper line for breakpoints of non-executable lines (was: Re: RFC: preserve line number when skipping prologue)
@ 2009-04-17 17:40 Marc Khouzam
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Marc Khouzam @ 2009-04-17 17:40 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Reporting proper line for breakpoints of non-executable lines
  2009-04-17 17:40 Reporting proper line for breakpoints of non-executable lines (was: Re: RFC: preserve line number when skipping prologue) Marc Khouzam
@ 2009-04-17 23:00 ` 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
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2009-04-17 23:00 UTC (permalink / raw)
  To: Marc Khouzam; +Cc: gdb

>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:

Marc> I also noticed that in MI in HEAD, there is a new field to the reply
Marc> of break-insert which is "original-location" which was added for a 
Marc> different reason
Marc> http://sourceware.org/ml/gdb-patches/2008-04/msg00272.html
Marc> But I was thinking it would be nice to use that field to show where
Marc> the user set the bp, while showing where the bp was really set by
Marc> GDB in the other fields.

Marc> Do it make sense?

Yeah.  For MI, I think the best thing would be to always report both
locations, and then let the UI authors decide what to display.

Tom


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Reporting proper line for breakpoints of non-executable lines  (was: Re: RFC: preserve line number when skipping prologue)
  2009-04-17 17:40 Reporting proper line for breakpoints of non-executable lines (was: Re: RFC: preserve line number when skipping prologue) Marc Khouzam
  2009-04-17 23:00 ` Reporting proper line for breakpoints of non-executable lines Tom Tromey
@ 2009-04-18  3:33 ` Joel Brobecker
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2009-04-18  3:33 UTC (permalink / raw)
  To: Marc Khouzam; +Cc: gdb

> Do it make sense?

I think we should have the right line being reported at least at
the MI level. For the CLI, I'm less definitive, but I would certainly
prefer if the debugger told me the actual line rather than the one
I chose.  Perhaps we could experiment with changing the behavior
at the CLI level too, and see if anyone complains.

-- 
Joel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-17 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-17 17:40 Reporting proper line for breakpoints of non-executable lines (was: Re: RFC: preserve line number when skipping prologue) Marc Khouzam
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox