This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: gdb.objc/objcdecode.exp test error..
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Matt Rice <ratmice at gmail dot com>, gdb-patches at sourceware dot org
- Date: Tue, 13 Oct 2009 18:59:40 -0700
- Subject: Re: gdb.objc/objcdecode.exp test error..
- References: <8ba6bed40903051731s41c9183aha18af51113f3c0ea@mail.gmail.com> <20090306173345.GI3744@adacore.com> <200903061913.43419.pedro@codesourcery.com> <8ba6bed40903070407q3e91f0ffs6fc67b2b9c329081@mail.gmail.com> <8ba6bed40903080716k3fbeb56t5605aef1864b26a3@mail.gmail.com> <8ba6bed40903081910t695c9d93jc34ba1c5d2793a2e@mail.gmail.com> <8ba6bed40909110443v61597c4ci7effd224ce26f937@mail.gmail.com> <20090924005319.GD5134@adacore.com> <m37hv0p1gj.fsf@fleche.redhat.com>
> I tend to think that the results should depend a bit on the current
> language.
I agree.
> If we did this, then "break create" in C mode would only find the C
> function of that name, but the ObjC code would be free to make
> "break create" do whatever searching ObjC programmers deem reasonable.
Just being the devil's advocate:
The issue with this approach, I suspect, is that ObjC developers where
used to be able to do ObjC debugging while in using the "c" language.
It seems to be an excessive convenience at first sight, but I understand
a bit the need for it, because I would imagine that a typical ObjC
program is a mix of C and ObjC, not pure ObjC. So if you switch
languages because you switch frames, sometimes "break foo" will "work"
(when the current language is "objc", and sometimes it won't (when
the language is c/c++, etc). The definition of "work" is currently
meant to match the current ObjC developer expectation.
I've already said that I think that the current feature is wrong and
should be removed. But perhaps we can find a compromise where "break
foo" now only matches "foo" when in C language, and extend the C
language support to provide a way of specifying all foo ObjC methods.
More generally speaking, I think it's OK to provide convenience
access to non-C language features, but it should not be at the expense
of the C language support.
--
Joel