This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: disable objective-c stuff when theres no objective-c cu.


> 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. 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.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]