>>>>> "Jakub" == Jakub Jelinek <ja...@redhat.com> writes:
Jakub> This patch on top of Jakub> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01224.html Jakub> and Jakub> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01723.html Jakub> implements parts of Cary's typed DWARF stack proposal: Jakub> http://www.dwarfstd.org/doc/040408.1.html I've been implementing this in GDB and I have a couple of questions. Should DW_OP_bra be restricted to integral types? Several other opcodes are restricted in this way, and it seems like an oversight to me that DW_OP_bra is lacking this restriction. (I've added this restriction in GDB.) Currently, the comparison operators are all defined as performing signed operations. So, what should happen in this case: DW_OP_lit0 DW_OP_GNU_convert <unsigned int> DW_OP_GNU_const_type <unsigned int> -1 DW_OP_gt That is, should this ignore the type (perhaps just using the type width), or is this a bug in the spec? Either answer here has problems. You can't really ignore the type, because that rules out floating point comparisons. I suppose you could special-case integral types. However, since "ordinary" (that is, pre-typed-DWARF) DWARF values do not have a consistent type, I think answering "bug" means having a special case for such values -- because they are treated as unsigned in most places, but signed in a few, and signed/unsigned type conversion should presumably only be done for such "typeless" values, not all values. I think I will implement the latter ("bug") approach. Tom