https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38534

--- Comment #23 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Andrew Burgess from comment #21)
> Setting to DW_CFA_undefined is the right thing to do.  DWARF says:
> 
>   The DW_CFA_undefined instruction takes a single unsigned LEB128 operand
>   that represents a register number. The required action is to set the rule
> for the
>   specified register to “undefined.”
> 
> which is exactly what you'd want here.
> 
> GDB has a distinction between "unspecified" (not really a DWARF thing) and
> "undefined" (the DWARF thing).  Registers that aren't given an initial state
> in the CIE start as "unspecified", the idea being (I believe) that we then
> apply some kind of ABI based rules on top.  So an "unspecified"
> call-clobbered register would be treated as "undefined", while a
> callee-saved register would be treated as "same-value" to begin with.
> 
> Setting a register to "undefined" in the DWARF should, I think, do what you
> want.

A patch is posted at

https://patchwork.sourceware.org/project/gcc/list/?series=30283

Reply via email to