Commit: Add support for attributes using DW_FORM_GNU_strp_alt

Nick Clifton nickc@redhat.com
Tue Jun 30 12:05:08 GMT 2020


Hi Guys,

  I am applying the patch below to update the DWARF parser's support for
  the DW_AT_comp_dir and DW_AT_dwo_name attributes when they use the
  DW_FORM_GNU_strp_alt form.

Cheers
  Nick

binutils/ChangeLog
2020-06-30  Nick Clifton  <nickc@redhat.com>

	* dwarf.c (read_and_display_attr_value): Support
	DW_FORM_GNU_strp_alt when used with DW_AT_dwo_name and
	DW_AT_comp_dir.

diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 34903bcf77..b2dc6fbba7 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -2574,6 +2574,9 @@ read_and_display_attr_value (unsigned long           attribute,
 	      case DW_FORM_strp:
 		add_dwo_name ((const char *) fetch_indirect_string (uvalue));
 		break;
+	      case DW_FORM_GNU_strp_alt:
+		add_dwo_name ((const char *) fetch_alt_indirect_string (uvalue));
+		break;
 	      case DW_FORM_GNU_str_index:
 		add_dwo_name (fetch_indexed_string (uvalue, this_set, offset_size, FALSE));
 		break;
@@ -2595,6 +2598,9 @@ read_and_display_attr_value (unsigned long           attribute,
 	      case DW_FORM_strp:
 		add_dwo_dir ((const char *) fetch_indirect_string (uvalue));
 		break;
+	      case DW_FORM_GNU_strp_alt:
+		add_dwo_dir (fetch_alt_indirect_string (uvalue));
+		break;
 	      case DW_FORM_line_strp:
 		add_dwo_dir ((const char *) fetch_indirect_line_string (uvalue));
 		break;



More information about the Binutils mailing list