]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add support for DW_ATE_UTF from DWARF4 which is needed for char16_t
authorTom Hughes <tom@compton.nu>
Mon, 18 Oct 2010 14:57:58 +0000 (14:57 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 18 Oct 2010 14:57:58 +0000 (14:57 +0000)
support in C++0X.

Patch from Christian Borntraeger on bug #254550.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11450

coregrind/m_debuginfo/priv_d3basics.h
coregrind/m_debuginfo/readdwarf3.c

index 75fcb46a46852918bfb40ec4ac3ad9e0242a30ae..b6703e9b31644a6cb760ef907f489b14710df370 100644 (file)
@@ -372,6 +372,8 @@ typedef enum
     DW_ATE_signed_fixed = 0xd,
     DW_ATE_unsigned_fixed = 0xe,
     DW_ATE_decimal_float = 0xf,
+    /* DWARF 4.  */
+    DW_ATE_UTF = 0x10,
     /* HP extensions.  */
     DW_ATE_HP_float80            = 0x80, /* Floating-point (80 bit).  */
     DW_ATE_HP_complex_float80    = 0x81, /* Complex floating-point (80 bit).  */
index b2fb1a74e4277a7002590850082f288b7ef88241..fa046cab507f4f85db212ca1265ea03cf31c4fd4 100644 (file)
@@ -2149,6 +2149,7 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents,
          if (attr == DW_AT_encoding && ctsSzB > 0) {
             switch (cts) {
                case DW_ATE_unsigned: case DW_ATE_unsigned_char:
+               case DW_ATE_UTF: /* since DWARF4, e.g. char16_t from C++ */
                case DW_ATE_boolean:/* FIXME - is this correct? */
                   typeE.Te.TyBase.enc = 'U'; break;
                case DW_ATE_signed: case DW_ATE_signed_char: