https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38534
--- Comment #21 from Andrew Burgess <aburgess at redhat dot com> --- 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. At least, if it doesn't, I think that would be on GDB to fix. This is just my personal thoughts, others might disagree.