[LLVMdev] More DWARF problems

Devang Patel dpatel at apple.com
Thu Apr 7 15:21:11 PDT 2011


On Apr 7, 2011, at 12:14 PM, Talin wrote:

> 
> OK I've been checking this out some more, and the DIEs don't look valid to me. Take a look at this output from dwarfdump -v:
> 
> 0x000000c7:     TAG_subprogram [3]  
> 0x000000c8:      AT_name( .debug_str[0x000001bd] = "construct" )
> 0x000000cc:      AT_MIPS_linkage_name( .debug_str[0x000001c7] = "tart.reflect.Parameter.construct(tart.core.String)" )
> 0x000000d0:      AT_decl_file( 0x3d ( "/Users/talin/Projects/tart/trunk/lib/std/tart/reflect/Parameter.tart" ) )
> 0x000000d1:      AT_decl_line( 0x0d ( 13 ) )
> 0x000000d2:      AT_type( cu + 0x00000066 => {0x00000103} (  ) )
> 0x000000d6:      AT_external( 0x01 )
> 0x000000d7:      AT_low_pc( 0x0000f780 )
> 0x000000db:      AT_high_pc( 0x0000f7b1 )
> 0x000000df:      AT_frame_base( <0x1> 55  ( reg5 ) )
> 
> 0x000000e1:     NULL
> 
> 0x000000e2: Compile Unit: length = 0x00000071  version = 0x0002  abbr_offset = 0x00000000  addr_size = 0x04  (next CU at 0x00000157)
> 
> 0x000000ed: TAG_compile_unit [1] *
> 0x000000ee:  AT_producer( .debug_str[0x00000001] = "0.1 tartc" )
> 0x000000f2:  AT_language( 0x0002 ( DW_LANG_C ) )
> 0x000000f4:  AT_name( .debug_str[0x000001fa] = "range.tart" )
> 0x000000f8:  AT_entry_pc( 0x00004360 )
> 0x000000fc:  AT_stmt_list( 0x00000000 ( 0x00000000 ) )
> 0x00000100:  AT_comp_dir( .debug_str[0x00000205] = "/Users/talin/Projects/tart/trunk/lib/std/tart/core" )
> 0x00000104:  AT_APPLE_major_runtime_vers( 0x01 )
>  
> In particular note that the DIE starting at 0x0c7, which is a TAG_subprogram, has a return type (AT_type) which points to 0x103. However if you look further down, you'll see that there is no DIE at offset 0x103. Instead it looks like it's pointing into the middle of another DIE.


This means the subprogram type is invalid. Set a breakpoint inside createSubprogramDIE() where addType() is used to add AT_type. 
-
Devang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110407/30e71e63/attachment.html>


More information about the llvm-dev mailing list