This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3.2 2/5] DWARF-5: .debug_names index producer
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Pedro Alves <palves at redhat dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>, Eli Zaretskii <eliz at gnu dot org>
- Cc: <gdb-patches at sourceware dot org>, <vleschuk at accesssoftek dot com>
- Date: Sat, 30 Dec 2017 22:51:41 -0500
- Subject: Re: [PATCH v3.2 2/5] DWARF-5: .debug_names index producer
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <149790572259.20186.14601775821404892582.stgit@host1.jankratochvil.net> <149790574432.20186.16599093068806909362.stgit@host1.jankratochvil.net> <83d19ywuuw.fsf@gnu.org> <20170622183542.GA8552@host1.jankratochvil.net> <83h8z7vnl6.fsf@gnu.org> <20170622200344.GA14233@host1.jankratochvil.net> <c51a42b6-b4d6-0d7f-64bb-8c529b321401@redhat.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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