]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Use Dwarf3 section version numbers as specified in Appendix F of the
authorJulian Seward <jseward@acm.org>
Mon, 3 Aug 2009 13:29:42 +0000 (13:29 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 3 Aug 2009 13:29:42 +0000 (13:29 +0000)
Dwarf3 standard.  (Jakub Jelinek).  This is #200029, patch in comment
#1.

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

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

index 02716576d7ac637947b94ec84469ff69875aefc7..3dfe6d49cb30c2ac1c401c2e50bd27405fe9f892 100644 (file)
@@ -512,9 +512,9 @@ void read_dwarf2_lineblock ( struct _DebugInfo* di,
       VG_(printf)("  DWARF Version:               %d\n", 
                   (Int)info.li_version);
 
-   if (info.li_version != 2) {
+   if (info.li_version != 2 && info.li_version != 3) {
       ML_(symerr)(di, True,
-                  "Only DWARF version 2 line info "
+                  "Only DWARF version 2 and 3 line info "
                   "is currently supported.");
       goto out;
    }
@@ -1162,9 +1162,9 @@ void ML_(read_debuginfo_dwarf3)
 
       /* version should be 2 */
       ver = *((UShort*)( block_img + blklen_len ));
-      if ( ver != 2 ) {
+      if ( ver != 2 && ver != 3 ) {
          ML_(symerr)( di, True,
-                      "Ignoring non-dwarf2 block in .debug_info" );
+                      "Ignoring non-Dwarf2/3 block in .debug_info" );
          continue;
       }
       
@@ -3575,8 +3575,8 @@ void ML_(read_callframe_info_dwarf3)
             VG_(printf)("cie.version     = %d\n", (Int)cie_version);
          if (di->ddump_frames)
             VG_(printf)("  Version:               %d\n", (Int)cie_version);
-         if (cie_version != 1) {
-            how = "unexpected CIE version (not 1)";
+         if (cie_version != 1 && cie_version != 3) {
+            how = "unexpected CIE version (not 1 nor 3)";
             goto bad;
          }
 
index 09dd3c87eb65e1215a9b8925d5d9086a498782a0..b6c6289492eb2febb50e70d6e000860899ec1c5f 100644 (file)
@@ -1322,8 +1322,8 @@ void read_filename_table( /*MOD*/D3VarParser* parser,
       get_Initial_Length( &is_dw64, &c,
            "read_filename_table: invalid initial-length field" );
    version = get_UShort( &c );
-   if (version != 2)
-     cc->barf("read_filename_table: Only DWARF version 2 line info "
+   if (version != 2 && version != 3)
+     cc->barf("read_filename_table: Only DWARF version 2 and 3 line info "
               "is currently supported.");
    /*header_length              = (ULong)*/ get_Dwarfish_UWord( &c, is_dw64 );
    /*minimum_instruction_length = */ get_UChar( &c );