[Dwarf-Discuss] DW_TAG_formal_parameter question

Michael Eager eager at eagercon.com
Fri Jun 5 11:35:07 PDT 2009


Stoyan Shopov wrote:
> Hello,
> 
> Lately, I have been doing some investigations of gcc dwarf debug 
> information generation, and today I managed to obtain the following 
> dwarfdump output for a gcc compiled object executable (excerpt):
> 
> ----------------------------------------------------------------------------
> <1><  122>      DW_TAG_subprogram
>                 DW_AT_external              yes(1)
>                 DW_AT_name                  func1
>                 DW_AT_decl_file             1 
> /home/shopov/src/gear-201108/engine/target_test/test_0.c
>                 DW_AT_decl_line             79
>                 DW_AT_prototyped            yes(1)
>                 DW_AT_type                  <74>
>                 DW_AT_inline                DW_INL_inlined
>                 DW_AT_sibling               <148>
> <2><  140>      DW_TAG_lexical_block
> <3><  141>      DW_TAG_formal_parameter
>                 DW_AT_abstract_origin       <98>
> ----------------------------------------------------------------------------
> 
> I know this list is not gcc specific, I just want to ask - is this 
> normal - a formal parameter to be a child of (an empty) lexical block? I 
> guess not, but I also could not find anything about that in the dwarf 
> standard, and dwarfdump -ka does not report anything wrong in this respect.

Can you post the source which corresponds to this DWARF data?
Also, is the DWARF listing complete?  Formal parameters generally
have names.

-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Dwarf-Discuss mailing list