[Dwarf-Discuss] OP_fbreg within AT_frame_base, static or dynamic ?

Tristan Gingold gingold@adacore.com
Tue Mar 1 09:23:39 GMT 2011


On Mar 1, 2011, at 10:21 AM, Tristan Gingold wrote:

> Hi,
> 
> The DW_OP_fbreg has a meaning only within the context of DW_AT_frame_base.
> 
> My question is about the semantic on the 'within' (which doesn't appear in the standard): it is static or
> dynamic.
> 
> Ie, is this dwarf CU valid ?
> Note that the node <113> which uses OP_deref is not a child or a grand-child of node <74> which has the AT_frame_base.

Argh, typo:                           ****** OP_fbreg.
(sorry)

> Some debuggers only allow static imbrication, while some others allow dynamic one.
> 
> <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
>    ...
> <1><74>: Abbrev Number: 2 (DW_TAG_subprogram)
>    ...
>    <92>   DW_AT_frame_base  : 0x0	(location list)
>    ...
> <2><9a>: Abbrev Number: 3 (DW_TAG_formal_parameter)
>    ...
> <2><a6>: Abbrev Number: 3 (DW_TAG_formal_parameter)
>    ...
> <2><b2>: Abbrev Number: 4 (DW_TAG_variable)
>    <b3>   DW_AT_name        : b	
>    <b5>   DW_AT_decl_file   : 1	
>    <b6>   DW_AT_decl_line   : 3	
>    <b7>   DW_AT_type        : <0x10a>	
>    <bb>   DW_AT_location    : 3 byte block: 91 50 6 	(DW_OP_fbreg: -48; DW_OP_deref)
> 
> <1><102>: Abbrev Number: 9 (DW_TAG_base_type)
>    <103>   DW_AT_byte_size   : 1	
>    <104>   DW_AT_encoding    : 6	(signed char)
>    <105>   DW_AT_name        : char	
> <1><10a>: Abbrev Number: 11 (DW_TAG_array_type)
>    <10b>   DW_AT_type        : <0x102>	
> <2><113>: Abbrev Number: 12 (DW_TAG_subrange_type)
>    <114>   DW_AT_type        : <0x11d>	
>    <118>   DW_AT_upper_bound : 3 byte block: 91 58 6 	(DW_OP_fbreg: -40; DW_OP_deref) [without DW_AT_frame_base]
> <1><11d>: Abbrev Number: 9 (DW_TAG_base_type)
>    <11e>   DW_AT_byte_size   : 8	
>    <11f>   DW_AT_encoding    : 7	(unsigned)
>    <120>   DW_AT_name        : long unsigned int	
> 
> (Maybe this question was already asked but I wasn't able to find the answer in the ml archives).
> 
> Regards,
> Tristan.





More information about the Dwarf-discuss mailing list