This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] DWARF5 .debug_info headers, .debug_types -> .debug_info DW_UT_type
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Cary Coutant <ccoutant at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 30 Oct 2016 20:31:47 +0100
- Subject: Re: [PATCH] DWARF5 .debug_info headers, .debug_types -> .debug_info DW_UT_type
- Authentication-results: sourceware.org; auth=none
- References: <20161021193242.GS7282@tucnak.redhat.com>
On Fri, 21 Oct 2016 21:32:42 +0200, Jakub Jelinek wrote:
> This patch changes the .debug_info headers to follow the current
> specification (I still hope the useless padding1/padding2 fields will be
> removed), and also changes the -gsplit-dwarf stuff to move dwo_id into
> the header and use DW_UT_{skeleton,split_*}.
During GDB consumer patch testing I needed this fix on top of your patch.
Jan
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 7c6a9e9..1c0ca35 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -2977,7 +2977,8 @@ skeleton_chain_node;
/* Fixed size portion of the DWARF compilation unit header. */
#define DWARF_COMPILE_UNIT_HEADER_SIZE \
- (DWARF_INITIAL_LENGTH_SIZE + DWARF_OFFSET_SIZE + 3)
+ (DWARF_INITIAL_LENGTH_SIZE + DWARF_OFFSET_SIZE \
+ + (dwarf_version < 5 ? 3 : 4 + 8 + DWARF_OFFSET_SIZE))
/* Fixed size portion of the DWARF comdat type unit header. */
#define DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE \