Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Matt Rice <ratmice@gmail.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
	Michael Snyder <msnyder@vmware.com>,
		"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: disable objective-c stuff when theres no objective-c cu.
Date: Wed, 06 Oct 2010 17:54:00 -0000	[thread overview]
Message-ID: <AANLkTi=zGQsegkPjuiet8s7StLpyveX95UKToOTkeA=T@mail.gmail.com> (raw)
In-Reply-To: <20101006170619.GA2784@adacore.com>

On Wed, Oct 6, 2010 at 10:06 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> i could have argued this more concisely,
>> what I mean is that 'break' is not related to the current language,
>> but the language which we want to be the current language
>> when the breakpoint is hit.  and so 'set language' to use language
>> specific breakpoints is arguably wrong because the current language
>> may not be the language of the breakpoint we want set.
>
> But at the same time, I don't think we want to be able to support
> all languages at the same time.

yeah, thats what we currently do though, so this is a much larger
change of rewriting linespec i suppose.

> If we can guess the language of
> the location, great, but I think that's sort of a chicken-and-egg
> problem. You need to parse the location to determine the language,
> but you need to determine which language to use in order to parse it.
>
> IMO, it's much cleaner to follow the current-language when parsing
> the breakpoint location.  Various languages may want to provide
> bridges to other syntaxes (for instance, the Obj-C language might
> want to provide c-like breakpoint expressions), but I don't think
> that this should be part of the general code.  More particularly,
> I don't think that linespect should have to handle "break [foo]"
> when not in objc mode.

I'm alright with 'inferring' the linespec parsing based on the current
language I suppose, I just don't think that the user should have to
'set language objective-c' to set a breakpoint in a language which is
*not* the current language, because if the user were to subsequently
do
p foo
and the scope was a c++ class,
then it would look for self->foo instead of this->foo.

so if that means something like 'break objc:[something orOther]'
and being able to drop the objc: if the current language is objc thats ok IMO.


  reply	other threads:[~2010-10-06 17:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 22:37 Matt Rice
2010-10-05 23:31 ` Michael Snyder
2010-10-05 23:35   ` Matt Rice
2010-10-06  2:30     ` Matt Rice
2010-10-06  8:51       ` Jan Kratochvil
2010-10-06 10:03         ` Matt Rice
2010-10-06 13:12           ` Matt Rice
2010-10-06 17:06             ` Joel Brobecker
2010-10-06 17:54               ` Matt Rice [this message]
2010-10-17 20:13             ` Jan Kratochvil
2010-10-17 21:57               ` Matt Rice

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='AANLkTi=zGQsegkPjuiet8s7StLpyveX95UKToOTkeA=T@mail.gmail.com' \
    --to=ratmice@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=msnyder@vmware.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