Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Pedro Alves <palves@redhat.com>,
	Jan Kratochvil	<jan.kratochvil@redhat.com>,
	Eli Zaretskii <eliz@gnu.org>
Cc: <gdb-patches@sourceware.org>, <vleschuk@accesssoftek.com>
Subject: Re: [PATCH v3.2 2/5] DWARF-5: .debug_names index producer
Date: Sun, 31 Dec 2017 03:52:00 -0000	[thread overview]
Message-ID: <83456520-cc06-25a5-de6e-9ae841341b45@ericsson.com> (raw)
In-Reply-To: <c51a42b6-b4d6-0d7f-64bb-8c529b321401@redhat.com>

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


  parent reply	other threads:[~2017-12-31  3:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 20:55 [PATCH v3 0/5] DWARF-5: .debug_names index Jan Kratochvil
2017-06-19 20:55 ` [PATCH v3 1/5] cc-with-tweaks.sh: Use gdb-add-index.sh Jan Kratochvil
2017-06-29 19:40   ` Simon Marchi
2017-07-01 15:23     ` [PATCH v3.1 " Jan Kratochvil
2017-12-08 23:43       ` Pedro Alves
2017-06-19 20:55 ` [PATCH v3 2/5] DWARF-5: .debug_names index producer Jan Kratochvil
2017-06-20 15:19   ` Eli Zaretskii
2017-06-22 18:35     ` [PATCH v3.1 " Jan Kratochvil
2017-06-22 19:18       ` Eli Zaretskii
2017-06-22 20:03         ` [PATCH v3.2 " Jan Kratochvil
2017-12-08 23:51           ` Pedro Alves
2017-12-12 15:38             ` Jan Kratochvil
2017-12-31  3:52             ` Simon Marchi [this message]
2017-06-19 20:56 ` [PATCH v3 3/5] Code cleanup: dwarf2_initialize_objfile return value Jan Kratochvil
2017-12-08 23:52   ` Pedro Alves
2017-12-11 13:04     ` Yao Qi
2017-12-11 13:20       ` Pedro Alves
2017-12-11 14:00         ` Pedro Alves
2017-12-11 15:08           ` [pushed] Unbreak build for non-ELF ports (Re: [PATCH v3 3/5] Code cleanup: dwarf2_initialize_objfile return value) Pedro Alves
2017-06-19 20:56 ` [PATCH v3 5/5] DWARF-5: .debug_names index consumer Jan Kratochvil
2017-06-28 21:21   ` [PATCH v3.1 " Jan Kratochvil
2017-07-02 14:30     ` [PATCH v3.2 " Jan Kratochvil
2017-12-08 23:59       ` Pedro Alves
2017-12-09  0:07         ` [pushed] Add gdb::hash_enum (Re: [PATCH v3.2 5/5] DWARF-5: .debug_names index consumer) Pedro Alves
2017-12-12 16:52         ` [PATCH v3.2 5/5] DWARF-5: .debug_names index consumer Jan Kratochvil
2017-12-13 21:57           ` [patch] DWARF-5 .debug_names DW_IDX_type_unit fix [Re: [PATCH v3.2 5/5] DWARF-5: .debug_names index consumer] Jan Kratochvil
2017-12-13 22:16             ` Pedro Alves
2017-12-13 23:03               ` Pedro Alves
2017-12-14  9:03                 ` [commit] " Jan Kratochvil
2017-06-19 20:56 ` [PATCH v3 4/5] Refactor: Move some generic code out of .gdb_index code Jan Kratochvil
2017-12-08 23:53   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83456520-cc06-25a5-de6e-9ae841341b45@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=palves@redhat.com \
    --cc=vleschuk@accesssoftek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox