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 v3.2 2/5] DWARF-5: .debug_names index producer


On 2017-12-08 06:51 PM, Pedro Alves wrote:
>> +static bool
>> +check_dwarf64_offsets ()
>> +{
>> +  for (int i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
>> +    {
>> +      const dwarf2_per_cu_data &per_cu (*dwarf2_per_objfile->all_comp_units[i]);
>> +
>> +      if (to_underlying (per_cu.sect_off) >= (static_cast<uint64_t> (1) << 32))
>> +	return true;
>> +    }
>> +  for (int i = 0; i < dwarf2_per_objfile->n_type_units; ++i)
>> +    {
>> +      const signatured_type &sigtype (*dwarf2_per_objfile->all_type_units[i]);
>> +      const dwarf2_per_cu_data &per_cu (sigtype.per_cu);
>> +
>> +      if (to_underlying (per_cu.sect_off) >= (static_cast<uint64_t> (1) << 32))
>> +	return true;
> These look like always return false, since per_cu.sect_off is 32-bit?
> I've left it as is, but it doesn't look right to me.  Seems like
> that makes all the 64-bit support dead as is.

Clang indeed complains about this tautology.

I made a patch that makes sect_offset 64-bits, if you want to take a look:
https://sourceware.org/ml/gdb-patches/2017-12/msg00530.html

Simon


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