This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: implement typed DWARF stack
CCing Jakub.
Ulrich> So just to clarify: in the discussion a while back, you said:
Sorry for any confusion. I hope this email will clear it up.
During our discussion I was convinced that DW_OP_shr should generally
use the sign of any explicit type to decide what to do (with a special
case for implicit type). However, Jakub informed me that GCC relied on
'shr' always zero-filling, even for explicit types. So, I changed the
code back. What is now in the tree implements the same semantics that
GCC assumes.
Ulrich> With this latest patch, it is now definitely *not* the case that
Ulrich> DW_OP_shr and DW_OP_shra behave the same on new-style typed
Ulrich> values. Instead, as I pointed out originally, DW_OP_shr now
Ulrich> always performs an unsigned operation, while DW_OP_shra respects
Ulrich> the value's type ...
Ulrich> Is that really what was intended?
At least the shr part is intended. I did not consider the shra case.
Ulrich> Or should rather DW_OP_shra now also be changed (to always
Ulrich> perform a signed operation as its name suggests)?
In other words, mirror the shr special case for shra.
This makes sense to me. Jakub, what do you think?
Tom