This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Unwinding CFI gcc practice of assumed `same value' regs
Andrew Haley wrote:
Sure it does. Not breaking things is an excellent reason, probably
one of the the best reasons you can have.
Nothing breaks if the responsible tools are updated in unison.
Really? Well, that's one interpretation. I don't believe that,
though. It's certainly an inconsistency in the specification, which
says that null-termination is supported, and this implies that you
can't put a zero in there.
Again, this is just because the "authors" of the ABI didn't think. x86
has the same problem. ebp is freely used and not just for non-NULL
values. Register's a scarce and I doubt you'll find any support
introducing a register class which says that the register can only hold
non-zero value.
"All of these" might be the right way to go. That is, keep
null-terminating the stack, strengthen the rules about what you might
do with %ebp, and extend debuginfo.
The thread setup and the startup code certainly does initialize the
register with zero. But this means nothing, the register can have zero
values in all kinds of other places.
--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â