Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix "ambiguous linespec" regression: break lineno
Date: Fri, 08 Jun 2012 20:41:00 -0000	[thread overview]
Message-ID: <87ehppczag.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20120608193958.GA10296@host2.jankratochvil.net> (Jan	Kratochvil's message of "Fri, 8 Jun 2012 21:39:58 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> It seems somehow clear to me, OK to check it in?

I agree it is an improvement.

However, why should this apply to linespecs used by 'break' but not by
other ones?

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.

This doesn't make sense to me.  Can we not just have a single notion and
use it everywhere?

If we really need two, can we do the processing in linespec.c?

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.

Tom


  reply	other threads:[~2012-06-08 20:41 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 [this message]
2012-06-08 22:19   ` Matt Rice
2012-06-11 15:21     ` Jan Kratochvil
2012-06-10 19:03   ` Jan Kratochvil
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=87ehppczag.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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