public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial.
@ 2020-09-23 14:51 Mark Wielaard
  2020-09-23 14:51 ` [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name Mark Wielaard
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Mark Wielaard @ 2020-09-23 14:51 UTC (permalink / raw)
  To: binutils; +Cc: Mark Wielaard

dwz in DWARF5 mode might produce DW_UT_partial unit types, which are
the same as DW_UT_compile unit types (but start with a DW_TAG_partial_unit)
and it might produce DW_FORM_ref_addr to create a reference between
units. Accept both constructs.

binutils/ChangeLog:

	* dwarf.c (read_and_display_attr_value): Handle DW_FORM_ref_addr
	for dwarf_version 5 just as version 3 and 4 (only 2 is different).
	(process_debug_info): Allow DW_UT_partial.
---
 binutils/ChangeLog | 7 +++++++
 binutils/dwarf.c   | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 5e8eb987371..21162ad5e6c 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2020-09-23  Mark Wielaard  <mark@klomp.org>
+
+	* dwarf.c (read_and_display_attr_value): Handle DW_FORM_ref_addr
+	for dwarf_version 5 just as version 3 and 4 (only 2 is
+	different).
+	(process_debug_info): Allow DW_UT_partial.
+
 2020-09-21  Ludovic Courtès  <ludo@gnu.org>
 
 	* doc/binutils.texi (objcopy, strip): Say that
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 603169226d4..bb177d1f175 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -2202,10 +2202,10 @@ read_and_display_attr_value (unsigned long           attribute,
     case DW_FORM_ref_addr:
       if (dwarf_version == 2)
 	SAFE_BYTE_GET_AND_INC (uvalue, data, pointer_size, end);
-      else if (dwarf_version == 3 || dwarf_version == 4)
+      else if (dwarf_version == 3 || dwarf_version == 4 || dwarf_version == 5)
 	SAFE_BYTE_GET_AND_INC (uvalue, data, offset_size, end);
       else
-	error (_("Internal error: DWARF version is not 2, 3 or 4.\n"));
+	error (_("Internal error: DWARF version is not 2, 3, 4 or 5.\n"));
 
       break;
 
@@ -3419,6 +3419,7 @@ process_debug_info (struct dwarf_section *           section,
 	}
 
       if (compunit.cu_unit_type != DW_UT_compile
+	  && compunit.cu_unit_type != DW_UT_partial
 	  && compunit.cu_unit_type != DW_UT_type)
 	{
 	  warn (_("CU at offset %s contains corrupt or "
-- 
2.18.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name.
  2020-09-23 14:51 [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial Mark Wielaard
@ 2020-09-23 14:51 ` Mark Wielaard
  2020-09-24 10:26   ` Nick Clifton
  2020-09-23 14:51 ` [PATCH 3/3] readelf: Show Unit Type for DWARF5 Mark Wielaard
  2020-09-24 10:23 ` [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial Nick Clifton
  2 siblings, 1 reply; 10+ messages in thread
From: Mark Wielaard @ 2020-09-23 14:51 UTC (permalink / raw)
  To: binutils; +Cc: Mark Wielaard

This adds a get_DW_UT_name function to dwarfnames using dwarf2.def
for use in binutils readelf to show the unit types in a DWARF5 header.

include/ChangeLog:

	* dwarf2.def: Add DWARF5 Unit type header encoding macros
	DW_UT_FIRST, DW_UT and DW_UT_END.
	* dwarf2.h (enum dwarf_unit_type): Removed and define using
	DW_UT_FIRST, DW_UT and DW_UT_END macros.
	(get_DW_UT_name): New function declaration.

libiberty/ChangeLog:

	* dwarfnames.c (get_DW_UT_name): Define using DW_UT_FIRST, DW_UT
	and DW_UT_END.
---
 include/ChangeLog      |  9 +++++++++
 include/dwarf2.def     | 11 +++++++++++
 include/dwarf2.h       | 24 +++++++++++-------------
 libiberty/ChangeLog    |  6 ++++++
 libiberty/dwarfnames.c |  7 +++++++
 5 files changed, 44 insertions(+), 13 deletions(-)

diff --git a/include/ChangeLog b/include/ChangeLog
index 38baf59ca4d..12fd17b7eae 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,12 @@
+2020-09-23  Mark Wielaard  <mark@klomp.org>
+
+	Sync with GCC
+	* dwarf2.def: Add DWARF5 Unit type header encoding macros
+	DW_UT_FIRST, DW_UT and DW_UT_END.
+	* dwarf2.h (enum dwarf_unit_type): Removed and define using
+	DW_UT_FIRST, DW_UT and DW_UT_END macros.
+	(get_DW_UT_name): New function declaration.
+
 2020-09-12  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR ld/26391
diff --git a/include/dwarf2.def b/include/dwarf2.def
index d8a8cce7947..13825a3eef7 100644
--- a/include/dwarf2.def
+++ b/include/dwarf2.def
@@ -805,3 +805,14 @@ DW_IDX (DW_IDX_hi_user, 0x3fff)
 DW_IDX (DW_IDX_GNU_internal, 0x2000)
 DW_IDX (DW_IDX_GNU_external, 0x2001)
 DW_END_IDX
+
+/* DWARF5 Unit type header encodings  */
+DW_FIRST_UT (DW_UT_compile, 0x01)
+DW_UT (DW_UT_type, 0x02)
+DW_UT (DW_UT_partial, 0x03)
+DW_UT (DW_UT_skeleton, 0x04)
+DW_UT (DW_UT_split_compile, 0x05)
+DW_UT (DW_UT_split_type, 0x06)
+DW_UT (DW_UT_lo_user, 0x80)
+DW_UT (DW_UT_hi_user, 0xff)
+DW_END_UT
diff --git a/include/dwarf2.h b/include/dwarf2.h
index bd33e06a75c..83cf50d7bf5 100644
--- a/include/dwarf2.h
+++ b/include/dwarf2.h
@@ -55,6 +55,7 @@
 #define DW_CFA_DUP(name, value) , name = value
 #define DW_IDX(name, value) , name = value
 #define DW_IDX_DUP(name, value) , name = value
+#define DW_UT(name, value) , name = value
 
 #define DW_FIRST_TAG(name, value) enum dwarf_tag { \
   name = value
@@ -77,6 +78,9 @@
 #define DW_FIRST_IDX(name, value) enum dwarf_name_index_attribute { \
   name = value
 #define DW_END_IDX };
+#define DW_FIRST_UT(name, value) enum dwarf_unit_type { \
+  name = value
+#define DW_END_UT };
 
 #include "dwarf2.def"
 
@@ -94,6 +98,8 @@
 #undef DW_END_CFA
 #undef DW_FIRST_IDX
 #undef DW_END_IDX
+#undef DW_FIRST_UT
+#undef DW_END_UT
 
 #undef DW_TAG
 #undef DW_TAG_DUP
@@ -108,6 +114,7 @@
 #undef DW_CFA_DUP
 #undef DW_IDX
 #undef DW_IDX_DUP
+#undef DW_UT
 
 /* Flag that tells whether entry has a child or not.  */
 #define DW_children_no   0
@@ -450,19 +457,6 @@ enum dwarf_range_list_entry
     DW_RLE_start_end = 0x06,
     DW_RLE_start_length = 0x07
   };
-
-/* Unit types in unit_type unit header field.  */
-enum dwarf_unit_type
-  {
-    DW_UT_compile = 0x01,
-    DW_UT_type = 0x02,
-    DW_UT_partial = 0x03,
-    DW_UT_skeleton = 0x04,
-    DW_UT_split_compile = 0x05,
-    DW_UT_split_type = 0x06,
-    DW_UT_lo_user = 0x80,
-    DW_UT_hi_user = 0xff
-  };
 \f
 /* @@@ For use with GNU frame unwind information.  */
 
@@ -551,6 +545,10 @@ extern const char *get_DW_CFA_name (unsigned int opc);
    recognized.  */
 extern const char *get_DW_IDX_name (unsigned int idx);
 
+/* Return the name of a DW_UT_ constant, or NULL if the value is not
+   recognized.  */
+extern const char *get_DW_UT_name (unsigned int ut);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index e6280d576bf..b8d41691a01 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2020-09-23  Mark Wielaard  <mark@klomp.org>
+
+	Sync with GCC
+	* dwarfnames.c (get_DW_UT_name): Define using DW_UT_FIRST, DW_UT
+	and DW_UT_END.
+
 2020-09-11  Felix Willgerodt  <felix.willgerodt@intel.com>
 
 	Sync with GCC
diff --git a/libiberty/dwarfnames.c b/libiberty/dwarfnames.c
index 968d1917532..af11668b431 100644
--- a/libiberty/dwarfnames.c
+++ b/libiberty/dwarfnames.c
@@ -64,6 +64,11 @@ Boston, MA 02110-1301, USA.  */
   switch (idx) {					\
   DW_IDX (name, value)
 #define DW_END_IDX } return 0; }
+#define DW_FIRST_UT(name, value) \
+  const char *get_DW_UT_name (unsigned int ut) {	\
+  switch (ut) {					\
+  DW_UT (name, value)
+#define DW_END_UT } return 0; }
 
 #define DW_TAG(name, value) case name: return # name ;
 #define DW_TAG_DUP(name, value)
@@ -78,6 +83,7 @@ Boston, MA 02110-1301, USA.  */
 #define DW_CFA_DUP(name, value)
 #define DW_IDX(name, value) case name: return # name ;
 #define DW_IDX_DUP(name, value)
+#define DW_UT(name, value) case name: return # name ;
 
 #include "dwarf2.def"
 
@@ -95,6 +101,7 @@ Boston, MA 02110-1301, USA.  */
 #undef DW_END_CFA
 #undef DW_FIRST_IDX
 #undef DW_END_IDX
+#undef DW_END_UT
 
 #undef DW_TAG
 #undef DW_TAG_DUP
-- 
2.18.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/3] readelf: Show Unit Type for DWARF5
  2020-09-23 14:51 [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial Mark Wielaard
  2020-09-23 14:51 ` [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name Mark Wielaard
@ 2020-09-23 14:51 ` Mark Wielaard
  2020-09-24 10:27   ` Nick Clifton
  2020-09-24 10:23 ` [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial Nick Clifton
  2 siblings, 1 reply; 10+ messages in thread
From: Mark Wielaard @ 2020-09-23 14:51 UTC (permalink / raw)
  To: binutils; +Cc: Mark Wielaard

binutils/ChangeLog:

	* dwarf.c (process_debug_info): Print Unit Type for DWARF5.
	* testsuite/binutils-all/dw5.W: Adjust expected output.
	* testsuite/binutils-all/dwarf-attributes.W: Likewise.

gas/ChangeLog:

	* testsuite/gas/elf/dwarf-5-cu.d: Adjust expected output.
---
 binutils/ChangeLog                                 | 6 ++++++
 binutils/dwarf.c                                   | 4 ++++
 binutils/testsuite/binutils-all/dw5.W              | 1 +
 binutils/testsuite/binutils-all/dwarf-attributes.W | 1 +
 gas/ChangeLog                                      | 3 +++
 gas/testsuite/gas/elf/dwarf-5-cu.d                 | 1 +
 6 files changed, 16 insertions(+)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 21162ad5e6c..f5d060df4e4 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2020-09-23  Mark Wielaard  <mark@klomp.org>
+
+	* dwarf.c (process_debug_info): Print Unit Type for DWARF5.
+	* testsuite/binutils-all/dw5.W: Adjust expected output.
+	* testsuite/binutils-all/dwarf-attributes.W: Likewise.
+
 2020-09-23  Mark Wielaard  <mark@klomp.org>
 
 	* dwarf.c (read_and_display_attr_value): Handle DW_FORM_ref_addr
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index bb177d1f175..4300b66ad5f 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -3361,6 +3361,10 @@ process_debug_info (struct dwarf_section *           section,
 		  dwarf_vmatoa ("x", compunit.cu_length),
 		  offset_size == 8 ? "64-bit" : "32-bit");
 	  printf (_("   Version:       %d\n"), compunit.cu_version);
+	  if (compunit.cu_version >= 5)
+	    printf (_("   Unit Type:     %s (%x)\n"),
+		    get_DW_UT_name (compunit.cu_unit_type) ?: "???",
+		    compunit.cu_unit_type);
 	  printf (_("   Abbrev Offset: 0x%s\n"),
 		  dwarf_vmatoa ("x", compunit.cu_abbrev_offset));
 	  printf (_("   Pointer Size:  %d\n"), compunit.cu_pointer_size);
diff --git a/binutils/testsuite/binutils-all/dw5.W b/binutils/testsuite/binutils-all/dw5.W
index ebeda6575d7..562b64fe220 100644
--- a/binutils/testsuite/binutils-all/dw5.W
+++ b/binutils/testsuite/binutils-all/dw5.W
@@ -3,6 +3,7 @@ Contents of the .debug_info section:
   Compilation Unit @ offset 0x0:
    Length:        0x160 \(32-bit\)
    Version:       5
+   Unit Type:     DW_UT_compile \(1\)
    Abbrev Offset: 0x0
    Pointer Size:  8
  <0><c>: Abbrev Number: 6 \(DW_TAG_compile_unit\)
diff --git a/binutils/testsuite/binutils-all/dwarf-attributes.W b/binutils/testsuite/binutils-all/dwarf-attributes.W
index 3a4e7409889..4e8386ae880 100644
--- a/binutils/testsuite/binutils-all/dwarf-attributes.W
+++ b/binutils/testsuite/binutils-all/dwarf-attributes.W
@@ -3,6 +3,7 @@ Contents of the .debug_info section:
   Compilation Unit @ offset 0x0:
    Length:        0x40 \(32-bit\)
    Version:       5
+   Unit Type:     DW_UT_compile \(1\)
    Abbrev Offset: 0x0
    Pointer Size:  4
  <0><c>: Abbrev Number: 1 \(User TAG value: 0x5555\)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c04b90afd4f..e1ad5db9d01 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,6 @@
+2020-09-23  Mark Wielaard  <mark@klomp.org>
+
+	* testsuite/gas/elf/dwarf-5-cu.d: Adjust expected output.
 
 2020-09-23  Lili Cui  <lili.cui@intel.com>
 
diff --git a/gas/testsuite/gas/elf/dwarf-5-cu.d b/gas/testsuite/gas/elf/dwarf-5-cu.d
index 839b4b7c77b..7db20a330b8 100644
--- a/gas/testsuite/gas/elf/dwarf-5-cu.d
+++ b/gas/testsuite/gas/elf/dwarf-5-cu.d
@@ -6,6 +6,7 @@
   Compilation Unit @ offset 0x0:
    Length:        0x.*
    Version:       5
+   Unit Type:     DW_UT_compile \(1\)
    Abbrev Offset: 0x0
    Pointer Size:  .
 #pass
-- 
2.18.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial.
  2020-09-23 14:51 [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial Mark Wielaard
  2020-09-23 14:51 ` [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name Mark Wielaard
  2020-09-23 14:51 ` [PATCH 3/3] readelf: Show Unit Type for DWARF5 Mark Wielaard
@ 2020-09-24 10:23 ` Nick Clifton
  2020-09-24 20:55   ` Mark Wielaard
  2 siblings, 1 reply; 10+ messages in thread
From: Nick Clifton @ 2020-09-24 10:23 UTC (permalink / raw)
  To: Mark Wielaard, binutils

Hi Mark,

> binutils/ChangeLog:
> 
> 	* dwarf.c (read_and_display_attr_value): Handle DW_FORM_ref_addr
> 	for dwarf_version 5 just as version 3 and 4 (only 2 is different).
> 	(process_debug_info): Allow DW_UT_partial.

Approved - please apply - I do however have one small suggested change:

> -      else if (dwarf_version == 3 || dwarf_version == 4)
> +      else if (dwarf_version == 3 || dwarf_version == 4 || dwarf_version == 5)
>  	SAFE_BYTE_GET_AND_INC (uvalue, data, offset_size, end);
>        else
> -	error (_("Internal error: DWARF version is not 2, 3 or 4.\n"));
> +	error (_("Internal error: DWARF version is not 2, 3, 4 or 5.\n"));

I think that it is safe to say that say that DW_FORM_ref_addr is not going
to change in future versions of the DWARF spec, so it would be easier/simpler
to change the check to be "dwarf_version > 2" and the error message to be
"DW_FORM_ref_addr is not supported in DWARF version 1".

Cheers
  Nick


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name.
  2020-09-23 14:51 ` [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name Mark Wielaard
@ 2020-09-24 10:26   ` Nick Clifton
  2020-09-24 21:12     ` Mark Wielaard
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Clifton @ 2020-09-24 10:26 UTC (permalink / raw)
  To: Mark Wielaard, binutils

Hi Mark,

> include/ChangeLog:
> 
> 	* dwarf2.def: Add DWARF5 Unit type header encoding macros
> 	DW_UT_FIRST, DW_UT and DW_UT_END.
> 	* dwarf2.h (enum dwarf_unit_type): Removed and define using
> 	DW_UT_FIRST, DW_UT and DW_UT_END macros.
> 	(get_DW_UT_name): New function declaration.
> 
> libiberty/ChangeLog:
> 
> 	* dwarfnames.c (get_DW_UT_name): Define using DW_UT_FIRST, DW_UT
> 	and DW_UT_END.
 
Approved - please apply.  Note the convention with libiberty/ChangeLog 
entries is to say "Sync with GCC" and then provide a copy of gcc's
libiberty changelog entry.

Cheers
  Nick


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] readelf: Show Unit Type for DWARF5
  2020-09-23 14:51 ` [PATCH 3/3] readelf: Show Unit Type for DWARF5 Mark Wielaard
@ 2020-09-24 10:27   ` Nick Clifton
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Clifton @ 2020-09-24 10:27 UTC (permalink / raw)
  To: Mark Wielaard, binutils

Hi Mark,

> binutils/ChangeLog:
> 
> 	* dwarf.c (process_debug_info): Print Unit Type for DWARF5.
> 	* testsuite/binutils-all/dw5.W: Adjust expected output.
> 	* testsuite/binutils-all/dwarf-attributes.W: Likewise.
> 
> gas/ChangeLog:
> 
> 	* testsuite/gas/elf/dwarf-5-cu.d: Adjust expected output.

Approved - please apply.

Cheers
  Nick


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial.
  2020-09-24 10:23 ` [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial Nick Clifton
@ 2020-09-24 20:55   ` Mark Wielaard
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Wielaard @ 2020-09-24 20:55 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

Hi Nick,

On Thu, Sep 24, 2020 at 11:23:49AM +0100, Nick Clifton wrote:
> > binutils/ChangeLog:
> > 
> > 	* dwarf.c (read_and_display_attr_value): Handle DW_FORM_ref_addr
> > 	for dwarf_version 5 just as version 3 and 4 (only 2 is different).
> > 	(process_debug_info): Allow DW_UT_partial.
> 
> Approved - please apply - I do however have one small suggested change:
> 
> > -      else if (dwarf_version == 3 || dwarf_version == 4)
> > +      else if (dwarf_version == 3 || dwarf_version == 4 || dwarf_version == 5)
> >  	SAFE_BYTE_GET_AND_INC (uvalue, data, offset_size, end);
> >        else
> > -	error (_("Internal error: DWARF version is not 2, 3 or 4.\n"));
> > +	error (_("Internal error: DWARF version is not 2, 3, 4 or 5.\n"));
> 
> I think that it is safe to say that say that DW_FORM_ref_addr is not going
> to change in future versions of the DWARF spec, so it would be easier/simpler
> to change the check to be "dwarf_version > 2" and the error message to be
> "DW_FORM_ref_addr is not supported in DWARF version 1".

Makes sense. Pushed with that change.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name.
  2020-09-24 10:26   ` Nick Clifton
@ 2020-09-24 21:12     ` Mark Wielaard
  2020-09-25  2:23       ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Wielaard @ 2020-09-24 21:12 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

Hi Nick,

On Thu, Sep 24, 2020 at 11:26:42AM +0100, Nick Clifton wrote:
> > include/ChangeLog:
> > 
> > 	* dwarf2.def: Add DWARF5 Unit type header encoding macros
> > 	DW_UT_FIRST, DW_UT and DW_UT_END.
> > 	* dwarf2.h (enum dwarf_unit_type): Removed and define using
> > 	DW_UT_FIRST, DW_UT and DW_UT_END macros.
> > 	(get_DW_UT_name): New function declaration.
> > 
> > libiberty/ChangeLog:
> > 
> > 	* dwarfnames.c (get_DW_UT_name): Define using DW_UT_FIRST, DW_UT
> > 	and DW_UT_END.
>  
> Approved - please apply.  Note the convention with libiberty/ChangeLog 
> entries is to say "Sync with GCC" and then provide a copy of gcc's
> libiberty changelog entry.

Sorry, I cheated a bit and had submitted the GCC change at the same
time as the binutils one and had forgotten to add the Sync with GCC to
the commit message Changelog (it was actually in the ChangeLog file
entry). The patch has been accepted for GCC now. I have added the same
Sync with GCC to the commit message.

BTW. It would be nice if binutils adopted the same method as GCC and
only required the ChangeLog entries in the commit message and not
require an actual ChangeLog file entry.

Thanks,

Mark

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name.
  2020-09-24 21:12     ` Mark Wielaard
@ 2020-09-25  2:23       ` Alan Modra
  2020-09-25  9:38         ` Mark Wielaard
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Modra @ 2020-09-25  2:23 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: Nick Clifton, binutils

On Thu, Sep 24, 2020 at 11:12:49PM +0200, Mark Wielaard wrote:
> BTW. It would be nice if binutils adopted the same method as GCC and
> only required the ChangeLog entries in the commit message and not
> require an actual ChangeLog file entry.

Yes, it would be nice.  I guess we'd need gdb to do the same.

elfcpp/
	* dwarf.h (DW_FIRST_UT, DW_UT, DW_END_UT): Define.

diff --git a/elfcpp/dwarf.h b/elfcpp/dwarf.h
index 1221f37f8a..d5e06d4d7d 100644
--- a/elfcpp/dwarf.h
+++ b/elfcpp/dwarf.h
@@ -81,6 +81,11 @@ namespace elfcpp
 #define DW_IDX_DUP(name, value) , name = value
 #define DW_END_IDX };
 
+#define DW_FIRST_UT(name, value) enum dwarf_unit_type { \
+  name = value
+#define DW_UT(name, value) , name = value
+#define DW_END_UT };
+
 #include "dwarf2.def"
 
 #undef DW_FIRST_TAG
@@ -117,6 +122,10 @@ namespace elfcpp
 #undef DW_IDX_DUP
 #undef DW_END_IDX
 
+#undef DW_FIRST_UT
+#undef DW_UT
+#undef DW_END_UT
+
 // Frame unwind information.
 
 enum DW_EH_PE


-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name.
  2020-09-25  2:23       ` Alan Modra
@ 2020-09-25  9:38         ` Mark Wielaard
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Wielaard @ 2020-09-25  9:38 UTC (permalink / raw)
  To: Alan Modra; +Cc: Nick Clifton, binutils

On Fri, Sep 25, 2020 at 11:53:17AM +0930, Alan Modra wrote:
> On Thu, Sep 24, 2020 at 11:12:49PM +0200, Mark Wielaard wrote:
> > BTW. It would be nice if binutils adopted the same method as GCC and
> > only required the ChangeLog entries in the commit message and not
> > require an actual ChangeLog file entry.
> 
> Yes, it would be nice.  I guess we'd need gdb to do the same.
> 
> elfcpp/
> 	* dwarf.h (DW_FIRST_UT, DW_UT, DW_END_UT): Define.

Oops. Another copy of dwarf.h. Sorry I missed that.
Thanks for updating it.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-09-25  9:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 14:51 [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial Mark Wielaard
2020-09-23 14:51 ` [PATCH 2/3] Sync libiberty and include with GCC for get_DW_UT_name Mark Wielaard
2020-09-24 10:26   ` Nick Clifton
2020-09-24 21:12     ` Mark Wielaard
2020-09-25  2:23       ` Alan Modra
2020-09-25  9:38         ` Mark Wielaard
2020-09-23 14:51 ` [PATCH 3/3] readelf: Show Unit Type for DWARF5 Mark Wielaard
2020-09-24 10:27   ` Nick Clifton
2020-09-24 10:23 ` [PATCH 1/3] binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial Nick Clifton
2020-09-24 20:55   ` Mark Wielaard

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