>>>> "Roland" == Roland McGrath
Mark> I couldn't find a definition for DW_OP_GNU_uninit. What does it
Roland> Yeah, good question. It's no my list to take it up on archer
Roland> and/or gcc lists to get a good specification for it. It seems
Roland> to be a not-really-used feature that perhaps was never thought
Roland> out or discussed very thoroughly.
Indeed. I was wondering about it, too. I ran across it while looking
at really implementing DW_OP_piece; the implementation of
DW_OP_GNU_uninit in gdb is weird.
I tracked down the original patches:
Rationale for the behavior is here:
Rationale for the choice of how it should not interact with the piece
stuff is here:
(This bit in particular I find very lame.)
Roland> The only use for the location-with-uninit I can really see is so
Roland> the debugger can install a watchpoint that the initializer is
Roland> expected to hit.
One other case I thought of is that with this feature, a user can still
assign to an uninitialized variable. So, printing will show that it is
bogus, but you could then fix the problem and continue.
I think it would be straightforward to extend the definition so that it
does apply to the current piece. This seems like the only sane
specification to me.