Jakub Jelinek wrote:
On Wed, Mar 09, 2016 at 01:24:37PM -0500, John DelSignore wrote:I agree completely with Jakub. Defining multiple "float" types that have varying byte-sizes, bit-sizes, and bit-offsets seems like a big mistake to me.The debugger has to know the ABI conventions for the target platform. It's unavoidable. Hopefully, for ISVs like us, the ABI is "standard" and all of the compilers for a given platform follow the ABI conventions. Knowing the ABI conventions for the platform is especially important when the debugger is asked to call functions in the target process, which is something that DWARF does not describe at all. Passing float and double actual parameters to target function requires the debugger know if the values goes on the stack, in a register, or is split between the stack and a register (yes, this does happen).Note that this isn't just about float and XMM registers, I don't see how that is different from say a char variable living in a x86_64 GPR (it is again the low 8 bits of a 64-bit register), or int variable in GPR (again, low 32 bits of a 64-bit register). How is that different from low 32 or 64-bits of a {128,256,512}-bit register (depending on the HW AVX or AVX512f support)? In all cases it is just DW_OP_reg*. I agree with you completely, I was just trying to keep my reply short (maybe too short). To answer your question, I believe: The way floats are stored in XMM registers is no different than the other cases you have mentioned. I think what you are saying, and I agree, is that the type of a variable is orthogonal to where (or how) the variable is stored. DWARF should not muddy the type entries with attributes that attempt to describe how a variable is stored somewhere. As I already said, the debugger has to know the ABI conventions for the target platforms it supports, and knowing how a float is stored in an XMM register, or a char is stored an x86_64 GPR, is part of the ABI specification. Cheers, John D. Jakub |
_______________________________________________ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org