Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: preserve line number when skipping prologue
Date: Thu, 26 Mar 2009 23:45:00 -0000	[thread overview]
Message-ID: <m3y6urvppa.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20090326224949.GM9472@adacore.com> (Joel Brobecker's message of "Thu\, 26 Mar 2009 15\:49\:49 -0700")

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> 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


  reply	other threads:[~2009-03-26 23:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 21:06 Tom Tromey
2009-03-26 23:10 ` Joel Brobecker
2009-03-26 23:45   ` Tom Tromey [this message]
2009-03-27  0:46     ` Joel Brobecker
2009-03-27  2:19   ` Daniel Jacobowitz
2009-03-27 16:00     ` 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=m3y6urvppa.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@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