public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: gdb@sources.redhat.com
Subject: [Fwd: Initial register state of unspecified CIE.INITIAL_INSTRUCTIONS?]
Date: Wed, 13 Aug 2003 17:30:00 -0000	[thread overview]
Message-ID: <3F3A75BE.9080308@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

FYI,

Andrew

[-- Attachment #2: Initial register state of unspecified CIE.INITIAL_INSTRUCTIONS? --]
[-- Type: message/rfc822, Size: 3862 bytes --]

From: Andrew Cagney <ac131313@redhat.com>
To: Dwarf 2 List <dwarf2@els.sgi.com>
Subject: Initial register state of unspecified CIE.INITIAL_INSTRUCTIONS?
Date: Wed, 13 Aug 2003 00:10:17 -0400
Message-ID: <3F39BA29.4050003@redhat.com>

Hello,

The CFI is broken down into two parts - a CIE and an FDE.  The CIE, 
which is shared by multiple FDEs provides the initial settings for all 
the registers (in INITIAL_INSTRUCTIONS).

What happens if a compiler fails to provide that information, or if that 
information is [very] incomplete?  What is the initial state of any 
undefined registers?  Undefined, ABI committee defined, compiler 
dependant, ...

The example in D.5:

cie              32                             length
cie+4            0xffffffff                     CIE_id
cie+8            1                              version
cie+9            0                              augmentation
cie+10           4                              code_alignment_factor, <c
cie+11           -4                             data_alignment_factor, <d
cie+12           8                              R8 is the return addr.
cie+13           DW_CFA_def_cfa (7, 0)          CFA = [R7]+0
cie+16           DW_CFA_same_value (0)          R0 not modified (=0)
cie+18           DW_CFA_undefined (1)           R1 scratch
cie+20           DW_CFA_undefined (2)           R2 scratch
cie+22           DW_CFA_undefined (3)           R3 scratch
cie+24           DW_CFA_same_value (4)          R4 preserve
cie+26           DW_CFA_same_value (5)          R5 preserve
cie+28           DW_CFA_same_value (6)          R6 preserve
cie+30           DW_CFA_same_value (7)          R7 preserve
cie+32           DW_CFA_register (8, 1)         R8 is in R1
cie+35           DW_CFA_nop                     padding
cie+36

strongly suggests that the intent was for the compiler to provide a 
completly populated initial table row, however I'm struggling to find 
any definitive language in the spec proper supporting this.

Andrew



                 reply	other threads:[~2003-08-13 17:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3F3A75BE.9080308@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).