Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Doug Evans <xdje42@gmail.com>
Cc: Jonathan Larmour <jifl@eCosCentric.com>, gdb@sourceware.org
Subject: Re: dwarf_block_to_fb_offset() and 64-bit host
Date: Sun, 25 Jan 2015 12:41:00 -0000	[thread overview]
Message-ID: <20150125083241.GB5745@host1.jankratochvil.net> (raw)
In-Reply-To: <m38ugr9tre.fsf@sspiff.org>

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


  reply	other threads:[~2015-01-25  8:32 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 [this message]
2015-01-26  8:48     ` Mark Kettenis
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=20150125083241.GB5745@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb@sourceware.org \
    --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