This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Re: Request for clarification - call frame instruction DW_CFA_remember_state
- To: davea at quasar dot engr dot sgi dot com, DWARF2 at corp dot sgi dot com, BRENDER at gemevn dot zko dot dec dot com
- Subject: Re: Request for clarification - call frame instruction DW_CFA_remember_state
- From: brender at gemevn dot zko dot dec dot com (Ron 603-884-2088)
- Date: Wed, 28 Feb 2001 12:28:32 -0500
- Reply-To: brender at gemevn dot zko dot dec dot com (Ron 603-884-2088)
|>In section 6.4.2 Call Frame Instructions, Draft 5DW,
|>November 30, 2000 states:
|>
|> Re 13. DW_CFA_remember_state
|> The DW_CFA_remember_state instruction takes no arguments.
|> The required action is to push the set of rules for every
|> _register_....
|>
|>It is unclear from section 6.4.1 "Structure of Call Frame
|>Information" whether or not CFA is intended to be a register
|>for this purpose.
|
>...the table beginning 6.4.1 is followed by:
>
>"The first column indicates an address for every location that contains
>code in a program. (In shared objects, this is an object-relative
>offset.) The remaining columns contain virtual unwinding rules that are
>associated with the indicated location. The first column of the rules
>defines the CFA rule which is a register and a signed offset that are
>added together to compute the CFA value.
>
>"The remaining columns are labeled by register number. This includes
>some registers that have special designation on some architectures such
>as the PC and the stack pointer register. (The actual mapping of
>registers for a particular architecture is performed by the augmenter.)
>The register columns contain rules that describe
>whether a given register has been saved and the rule to find
>the value for the register in the previous frame."
>
>The above paragraph is, it seems to me, crystal clear. CFA is a column
>in the table after LOC and therefore has a register number
>(it not necessarily a physical register in a given
>implentation, but it is assigned a dwarf register number).
I'm not sure I follow the argument. The text says:
The first column of the rules [after LOC] defines the CFA rule...
The remaining columns are labeled by register number...
^^^^^^^^^
my emphasis
which sure seems like it says that the first column is *not* (or at
least *not necessarily*) labelled by a register number (although
perhaps it *could* be at the choice of an augmenter).
>...
>
>|Does anyone care to argue differently?
>
>Well, note my quote from 6.4.1.
> a) the above two have different (non-parallel) wording.
> this is not desirable: the wording should match, IMO,
> aside from the direction.
>
> b) CFA and any other synthetics and all physical registers
> have rules and they are all assigned dwarf register
> numbers, so is the above remember-state
Besides, if CFA is (ncessarily) "merely" one of the logical registers,
why are there several DW_CFA instructions that set/modify the
CFA specifically and a distinct set of instructions that apply to the
registers? If the CFA is one of "the registers", then all of the former
are redundant, yes?
Me thinks we agree that we want CFA to be saved/restored and only the
means to assure clarity is at issue. I am open to suggestions...