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.


On Wed, Oct 6, 2010 at 3:03 AM, Matt Rice <ratmice@gmail.com> wrote:
> On Wed, Oct 6, 2010 at 1:51 AM, Jan Kratochvil
> <jan.kratochvil@redhat.com> wrote:
>> On Wed, 06 Oct 2010 04:30:33 +0200, Matt Rice wrote:
>>> that we can lessen the impact by checking for is_objc_method, or for
>>> objective-c compilation units. (is_objc_method doesn't neccesarily
>>> affect future lookups should it call set_language_has_cu_loaded?)
>>
>> Wouldn't be enough to replace the bitmask just by?
>> ? ? ? ?if (current_language->la_language == language_objc)
>
> objective-c uses mixed compilation units possibly more than most other
> languages,

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


>>> here is when gcc started to emit DW_LANG_ObjC, maybe we could fall
>>> back to source files with the .m extension.
>>> http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01515.html
>>
>> For current_language it works even without DW_LANG_ObjC due to:
>> ? ? ? ?init_filename_language_table (void)
>> ? ? ? ? ? ? ?add_filename_language (".m", language_objc);
>
> maybe the dwarf2read call to set_language_has_cu_loaded is redundant
> then since i added the call from set_language
>

doesn't seem as though reading language symfiles frobs the current
language afaict.
attached should fix GDB's pre-DW_LANG_ObjC, tested it with stabs,
don't have an old
enough compiler to test the others easily though.

attached calls set_language_has_cu_loaded when calling
deduce_language_from_filename.
except for the symtab case, i dont think we need it there since we
should already have called it
when making psytmabs.  Thanks for the pointer.

for some reason i installed gnat/libgnat-devel but still not getting
ada testsuite :/
i'll get started looking at the new failures.

Attachment: gdb-lang-objc.diff
Description: Binary data


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