]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
treat DW_TAG_skeleton_unit like DW_TAG_compile_unit
authorLuboš Luňák <l.lunak@centrum.cz>
Tue, 26 Apr 2022 06:35:16 +0000 (08:35 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 13 Jun 2022 20:07:40 +0000 (22:07 +0200)
It's basically the same, except for being split-dwarf. Handling
it is required e.g. for reading line info.

coregrind/m_debuginfo/readdwarf.c
coregrind/m_debuginfo/readdwarf3.c

index e50d5d46d7bafc373197d194fec2b09da18e38db..79d6764eafeeab65c2a3702196485ff12ce0d536 100644 (file)
@@ -1136,7 +1136,8 @@ void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui,
 
       tag = step_leb128U( &abbrev_img );
 
-      if ( tag != 0x0011 /*TAG_compile_unit*/ )
+      if ( tag != 0x0011 /*TAG_compile_unit*/
+           && tag != 0x004a /*TAG_skeleton_unit*/ )
          return; /* Not a compile unit (might be partial) or broken DWARF. */
 
       /* DW_CHILDREN_yes or DW_CHILDREN_no */
@@ -1330,7 +1331,8 @@ void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui,
          }
          
          /* Now store the members we need in the UnitInfo structure */
-         if ( tag == 0x0011 /*TAG_compile_unit*/ ) {
+         if ( tag == 0x0011 /*TAG_compile_unit*/
+              || tag == 0x004a /*TAG_skeleton_unit*/ ) {
                  if ( name == 0x03 ) ui->name = sval;      /* DW_AT_name */
             else if ( name == 0x1b ) ui->compdir = sval;   /* DW_AT_compdir */
             else if ( name == 0x10 ) ui->stmt_list = cval; /* DW_AT_stmt_list */
index e9aab0dd5286b2dfd17ea18aa27a6f8466c9c3c5..86af340ebc6dcc21e590c4e56498d42f448671a2 100644 (file)
@@ -2826,7 +2826,8 @@ static void parse_var_DIE (
 
    if (dtag == DW_TAG_compile_unit
        || dtag == DW_TAG_type_unit
-       || dtag == DW_TAG_partial_unit) {
+       || dtag == DW_TAG_partial_unit
+       || dtag == DW_TAG_skeleton_unit) {
       Bool have_lo    = False;
       Bool have_hi1   = False;
       Bool hiIsRelative = False;
@@ -3467,7 +3468,8 @@ static Bool parse_inl_DIE (
    /* Get info about DW_TAG_compile_unit and DW_TAG_partial_unit which in theory
       could also contain inlined fn calls, if they cover an address range.  */
    Bool unit_has_addrs = False;
-   if (dtag == DW_TAG_compile_unit || dtag == DW_TAG_partial_unit) {
+   if (dtag == DW_TAG_compile_unit || dtag == DW_TAG_partial_unit
+       || dtag == DW_TAG_skeleton_unit) {
       Bool have_lo    = False;
       Addr ip_lo    = 0;
       const HChar *compdir = NULL;
@@ -3859,7 +3861,8 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents,
 
    if (dtag == DW_TAG_compile_unit
        || dtag == DW_TAG_type_unit
-       || dtag == DW_TAG_partial_unit) {
+       || dtag == DW_TAG_partial_unit
+       || dtag == DW_TAG_skeleton_unit) {
       if (level == 0)
          setup_cu_bases(cc, c_die, abbv);
       /* See if we can find DW_AT_language, since it is important for