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: [PATCH v2 4/8] DWARF-5 basic functionality


On Wed, Feb 22 2017, Jan Kratochvil wrote:

> What compiler/version/options do you use?  I have tried now
> 	gcc-4.8.5-11.el7.x86_64
> 	CFLAGS=-O3 CXXFLAGS=-O3 ./configure;make

I saw the warning with an upstream GCC I recently built myself for
s390x.  Today I retried with a fresh version from GCC git, with the same
result: gcc (GCC) 7.0.1 20170222 (experimental)

> While I get some warnings/errors none of them is in dwarf2read.c.
>
> I do not want to patch it without reproducibility of the warnings.

Sure.  Unfortunately the maybe-uninitialized warnings highly depend on
compiler version, platform, optimization level, etc.  Since this is a
false positive, I don't necessarily propose a change in this case.

[...]

>> But then I wonder
>> about the effect of the call to create_debug_type_hash_table in
>> create_all_type_units:
>> 
>>   create_debug_type_hash_table (NULL, &dwarf2_per_objfile->info, types_htab,
>> 				rcuh_kind::COMPILE);
>> 
>> Is that needed?
>
> Yes.  Otherwise GDB would not read definitions of classes during
> 	-gdwarf-5 -fdebug-types-section
> as then DW_UT_type are located inside .debug_info.

Ah, I see; thanks for explanation.  Seems I was misled by the function
description that mentions "all entries in the .debug_types section", but
fails to mention the .debug_info section.

I also stumbled upon the fact that read_comp_unit_head performs the
conditional initialization under "if (section_kind == rcuh_kind::TYPE)"
instead of checking for the appropriate unit type.  This works because
section_kind is adjusted accordingly above, but it might be clearer
otherwise.

--
Andreas


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