public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>
Cc: gdb-patches@sourceware.org, Victor Leschuk <vleschuk@accesssoftek.com>
Subject: Re: [PATCH v2 4/8] DWARF-5 basic functionality
Date: Wed, 22 Feb 2017 14:29:00 -0000	[thread overview]
Message-ID: <20170222142857.GA25383@host1.jankratochvil.net> (raw)
In-Reply-To: <m3wpcjl5df.fsf@oc1027705133.ibm.com>

On Tue, 21 Feb 2017 20:18:36 +0100, Andreas Arnez wrote:
> When I compile with "-O3", GCC now yields warnings for the two changed
> lines above:
> 
>   [...] warning: ‘header.comp_unit_head::type_offset_in_tu.cu_offset::cu_off’
>   may be used uninitialized in this function [-Wmaybe-uninitialized]

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

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.


> I *think* GCC is wrong.  From what I understand, we can only get here if
> header.unit_type == DW_UT_type, and then these fields should have been
> initialized in read_comp_unit_head before (right?).

Yes, I hope so.


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


> When doing so (see untested patch below),

No, that breaks: -gdwarf-5 -fdebug-types-section


Jan

  reply	other threads:[~2017-02-22 14:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-19 21:28 [PATCH v2 1/8] Code cleanup: Split create_debug_types_hash_table Jan Kratochvil
2017-02-19 21:28 ` [PATCH v2 2/8] Code cleanup: Split dwarf2_ranges_read to a callback Jan Kratochvil
2017-02-20 20:06   ` [commit] " Jan Kratochvil
2017-02-19 21:28 ` [PATCH v2 6/8] DWARF-5: Macros Jan Kratochvil
2017-02-20 20:08   ` [commit] " Jan Kratochvil
2017-02-19 21:28 ` [PATCH v2 7/8] DWARF-5: DW_FORM_data16 Jan Kratochvil
2017-02-20 20:09   ` [commit] " Jan Kratochvil
2017-02-19 21:28 ` [PATCH v2 3/8] Code cleanup: Refactor abbrev_table_read_table cycle Jan Kratochvil
2017-02-20 20:06   ` [commit] " Jan Kratochvil
2017-02-19 21:28 ` [PATCH v2 4/8] DWARF-5 basic functionality Jan Kratochvil
2017-02-21 19:18   ` Andreas Arnez
2017-02-22 14:29     ` Jan Kratochvil [this message]
2017-02-22 17:38       ` Andreas Arnez
2017-02-22 18:32         ` Jan Kratochvil
2017-02-23 16:59           ` Andreas Arnez
2017-02-24 12:57             ` [patch] DWARF-5: Initialization due to a false compiler warning [Re: [PATCH v2 4/8] DWARF-5 basic functionality] Jan Kratochvil
2017-02-26 15:56               ` [commit] " Jan Kratochvil
2017-02-19 21:28 ` [PATCH v2 5/8] DWARF-5: call sites Jan Kratochvil
2017-02-20  3:31   ` Eli Zaretskii
2017-02-20 20:08   ` [commit] " Jan Kratochvil
2017-02-19 21:28 ` [PATCH v2 8/8] DWARF-5: NEWS Jan Kratochvil
2017-02-20  3:31   ` Eli Zaretskii
2017-02-20 20:09   ` [commit] " Jan Kratochvil
2017-02-20 20:05 ` [commit] [PATCH v2 1/8] Code cleanup: Split create_debug_types_hash_table Jan Kratochvil

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=20170222142857.GA25383@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).