[PATCH] D43439: [dsymutil] Skip DW_AT_sibling attributes.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 08:03:14 PST 2018


aprantl added a comment.

I dusted off my PowerBook G4 and compiled

  struct A { int a; } a;
  struct B { int b; } b;

which outputs:

   File: sibling.o (ppc)
  ----------------------------------------------------------------------
  .debug_info contents:
  
  0x00000000: Compile Unit: length = 0x000000ba  version = 0x0002  abbr_offset = 0x00000000  addr_size = 0x04  (next CU at 0x000000be)
  
  0x0000000b: TAG_compile_unit [1] *
               AT_producer( "GNU C 4.0.1 (Apple Computer, Inc. build 5370)" )
               AT_language( DW_LANG_C89 )
               AT_name( "/tmp/sibling.c" )
               AT_low_pc( 0x00000000 )
               AT_high_pc( 0x00000000 )
               AT_stmt_list( 0x00000000 )
  
  0x00000056:     TAG_structure_type [2]  
                   AT_name( "A" )
                   AT_byte_size( 0x00 )
                   AT_decl_file( "/tmp/sibling.c" )
                   AT_decl_line( 1 )
  
  0x0000005c:     TAG_structure_type [2]  
                   AT_name( "B" )
                   AT_byte_size( 0x00 )
                   AT_decl_file( "/tmp/sibling.c" )
                   AT_decl_line( 3 )
  
  0x00000062:     TAG_array_type [3] *
                   AT_type( {0x0000006d} ( int ) )
                   AT_sibling( {0x0000006d} )
  
  0x0000006b:         TAG_subrange_type [4]  
  
  0x0000006c:         NULL
  
  0x0000006d:     TAG_base_type [5]  
                   AT_byte_size( 0x04 )
                   AT_encoding( DW_ATE_signed )
                   AT_name( "int" )
  
  0x00000074:     TAG_variable [6]  
                   AT_name( "__CFConstantStringClassReference" )
                   AT_type( {0x00000062} ( int[] ) )
                   AT_external( 0x01 )
                   AT_artificial( 0x01 )
                   AT_declaration( 0x01 )
  
  0x0000009d:     TAG_variable [7]  
                   AT_name( "A" )
                   AT_decl_file( "/tmp/sibling.c" )
                   AT_decl_line( 1 )
                   AT_type( {0x00000056} ( A ) )
                   AT_external( 0x01 )
                   AT_location( [0x00000000] )
  
  0x000000ad:     TAG_variable [7]  
                   AT_name( "B" )
                   AT_decl_file( "/tmp/sibling.c" )
                   AT_decl_line( 3 )
                   AT_type( {0x0000005c} ( B ) )
                   AT_external( 0x01 )
                   AT_location( [0x00000000] )
  
  0x000000bd:     NULL
  ...

Would that work as a testcase? Do you need it to be i386 instead?


Repository:
  rL LLVM

https://reviews.llvm.org/D43439





More information about the llvm-commits mailing list