>>>>> "Roland" == Roland McGrath <[email protected]> writes:

Mark> I couldn't find a definition for DW_OP_GNU_uninit. What does it
Mark> express?

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:

http://gcc.gnu.org/ml/gcc-patches/2007-05/msg00068.html
http://sourceware.org/ml/gdb-patches/2007-05/msg00024.html

Rationale for the behavior is here:

http://gcc.gnu.org/ml/gcc-patches/2007-05/msg00666.html

Rationale for the choice of how it should not interact with the piece
stuff is here:

http://sourceware.org/ml/gdb-patches/2007-05/msg00146.html

(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.

Tom
_______________________________________________
elfutils-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/elfutils-devel

Reply via email to