From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: jan.kratochvil@redhat.com
Cc: xdje42@gmail.com, jifl@eCosCentric.com, gdb@sourceware.org
Subject: Re: dwarf_block_to_fb_offset() and 64-bit host
Date: Mon, 26 Jan 2015 08:48:00 -0000 [thread overview]
Message-ID: <201501251239.t0PCdFCC010381@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <20150125083241.GB5745@host1.jankratochvil.net> (message from Jan Kratochvil on Sun, 25 Jan 2015 09:32:41 +0100)
> Date: Sun, 25 Jan 2015 09:32:41 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> 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.
Well, some architectures (including amd64) reserve an area "beyond"
the stack pointer that can be used for temporary data (the "red zone"
on amd64). Now the amd64 "red zone" might not be used for storing
entry values, but for leaf frames it could. So I'd fb_offset should
be LONGEST instead of CORE_ADDR.
next prev parent reply other threads:[~2015-01-25 12:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-25 8:03 Jonathan Larmour
2015-01-25 8:27 ` Doug Evans
2015-01-25 12:41 ` Jan Kratochvil
2015-01-26 8:48 ` Mark Kettenis [this message]
2015-01-25 8:32 ` Jan Kratochvil
2015-02-03 3:24 ` Jonathan Larmour
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201501251239.t0PCdFCC010381@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=jifl@eCosCentric.com \
--cc=xdje42@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox