From 2335dcea6561ed295575a0521af79aed48416cc3 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 12 Sep 2012 17:57:52 +0000 Subject: [PATCH] MFC r239870: Teach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn't error out on files that contain it. (This attribute can be emitted by newer versions of clang.) git-svn-id: svn://svn.freebsd.org/base/stable/8@240413 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/binutils/include/elf/dwarf2.h | 3 ++- contrib/gdb/gdb/dwarf2read.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/binutils/include/elf/dwarf2.h b/contrib/binutils/include/elf/dwarf2.h index bede7e297..f867697ae 100644 --- a/contrib/binutils/include/elf/dwarf2.h +++ b/contrib/binutils/include/elf/dwarf2.h @@ -236,7 +236,8 @@ enum dwarf_form DW_FORM_ref4 = 0x13, DW_FORM_ref8 = 0x14, DW_FORM_ref_udata = 0x15, - DW_FORM_indirect = 0x16 + DW_FORM_indirect = 0x16, + DW_FORM_flag_present = 0x19 }; /* Attribute names and codes. */ diff --git a/contrib/gdb/gdb/dwarf2read.c b/contrib/gdb/gdb/dwarf2read.c index cc69ede55..f4da285ac 100644 --- a/contrib/gdb/gdb/dwarf2read.c +++ b/contrib/gdb/gdb/dwarf2read.c @@ -4604,6 +4604,9 @@ read_attribute_value (struct attribute *attr, unsigned form, DW_UNSND (attr) = read_1_byte (abfd, info_ptr); info_ptr += 1; break; + case DW_FORM_flag_present: + DW_UNSND (attr) = 1; + break; case DW_FORM_sdata: DW_SND (attr) = read_signed_leb128 (abfd, info_ptr, &bytes_read); info_ptr += bytes_read; @@ -7226,6 +7229,9 @@ dump_die (struct die_info *die) else fprintf_unfiltered (gdb_stderr, "flag: FALSE"); break; + case DW_FORM_flag_present: + fprintf_unfiltered (gdb_stderr, "flag: TRUE"); + break; case DW_FORM_indirect: /* the reader will have reduced the indirect form to the "base form" so this form should not occur */ -- 2.45.0