From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix "ambiguous linespec" regression: break lineno
Date: Sun, 10 Jun 2012 19:03:00 -0000 [thread overview]
Message-ID: <20120610190308.GA23551@host2.jankratochvil.net> (raw)
In-Reply-To: <87ehppczag.fsf@fleche.redhat.com>
On Fri, 08 Jun 2012 22:40:55 +0200, Tom Tromey wrote:
> However, why should this apply to linespecs used by 'break' but not by
> other ones?
+
> If we really need two, can we do the processing in linespec.c?
Because the values were called default_breakpoint_* before the patch
commit eb1a2e1ef3957213a420bbeedff9c045016e3aa0
Author: Justin Lebar <justin.lebar@gmail.com>
skip/blacklist patch
renamed default_breakpoint_* into *_last_displayed_ functions.
So I find OK to use default_breakpoint_* in breakpoint.c and not to use
default_breakpoint_* in other .c files.
> Jan> + if (last_displayed_sal_is_valid ()
>
> linespec.c:initialize_defaults has:
>
> struct symtab_and_line cursal =
> get_current_source_symtab_and_line ();
>
> It seems like we have two similar notions here -- the "current" source
> line and the "last displayed" source line.
default_breakpoint_* vs. current_source_* locations were always duplicate this
way.
> This doesn't make sense to me. Can we not just have a single notion and
> use it everywhere?
I have some draft patch almost without regressions but those two locations had
some logic. "break" should put breakpoint to the current frame and not to
some last arbitrary line listed.
But that seems as definitely a cleanup patch outside of the scope of this one.
> I realize you're just reverting a bit of code - but is that ObjC hack
> really needed? I'd like us to get away from this kind of thing.
It needs to detect the pattern ^[+-] (for 'break +5', 'break -3' etc.) but it
should not get confused by the ObjC breakpoints for -[func] or +[func].
I agree if the two locations get unified it is no longer needed.
Thanks,
Jan
next prev parent reply other threads:[~2012-06-10 19:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 19:40 Jan Kratochvil
2012-06-08 20:41 ` Tom Tromey
2012-06-08 22:19 ` Matt Rice
2012-06-11 15:21 ` Jan Kratochvil
2012-06-10 19:03 ` Jan Kratochvil [this message]
2012-06-11 15:15 ` Tom Tromey
2012-06-11 19:17 ` [commit] " Jan Kratochvil
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=20120610190308.GA23551@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/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