Re: dwarf_block_to_fb_offset() and 64-bit host
Jan Kratochvil <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 25 Jan 2015 08:58:13 +0100, Doug Evans wrote:
> I guess the first question is: Is an fb_offset of -28 valid?
> i.e., is a negative value valid?
It should not be for decreasing-sp archs (like x86*):
gdb.arch/amd64-entry-value:
<3><a90>: Abbrev Number: 8 (DW_TAG_GNU_call_site_parameter)
<a91> DW_AT_location : 2 byte block: 77 0 (DW_OP_breg7 (rsp): 0)
^
<a94> DW_AT_GNU_call_site_value: 1 byte block: 3b (DW_OP_lit11)
<3><a96>: Abbrev Number: 8 (DW_TAG_GNU_call_site_parameter)
<a97> DW_AT_location : 2 byte block: 77 8 (DW_OP_breg7 (rsp): 8)
^
<a9a> DW_AT_GNU_call_site_value: 1 byte block: 3c (DW_OP_lit12)
<3><a9c>: Abbrev Number: 8 (DW_TAG_GNU_call_site_parameter)
<a9d> DW_AT_location : 2 byte block: 77 10 (DW_OP_breg7 (rsp): 16)
^^
<aa0> DW_AT_GNU_call_site_value: 11 byte block: f4 31 8 0 0 0 0 0 0 27 40 (DW_OP_GNU_const_type: <0x31> 8 byte block: 0 0 0 0 0 0 27 40 )
<3><aac>: Abbrev Number: 8 (DW_TAG_GNU_call_site_parameter)
<aad> DW_AT_location : 2 byte block: 77 18 (DW_OP_breg7 (rsp): 24)
^^
<ab0> DW_AT_GNU_call_site_value: 11 byte block: f4 31 8 0 0 0 0 0 0 29 40 (DW_OP_GNU_const_type: <0x31> 8 byte block: 0 0 0 0 0 0 29 40 )
Despite its 'fb_offset' name it is an offset from SP so parameters should not
be stored in the to-be-rewritten area under SP.
Jan