From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: ac131313@cygnus.com Cc: eliz@is.elta.co.il, gdb@sources.redhat.com Subject: Re: i386 register numbering Date: Sat, 28 Jul 2001 10:41:00 -0000 Message-id: <200107281741.f6SHfoN19109@delius.kettenis.local> References: <200107281012.GAA02314@delorie.com> <200107281214.IAA07439@delorie.com> <3B62D68B.6010401@cygnus.com> X-SW-Source: 2001-07/msg00396.html Date: Sat, 28 Jul 2001 11:13:15 -0400 From: Andrew Cagney They map a stab/dwarf/... reg onto a cooked regnum (not to be confused with a raw reg found in the register cache). Because the i386 implements its registers using the old PSUEDO / CONVERT stuff, the importance of differentiating between the two may not be obvious. For most of the registers on the i386, the raw and the cooked regnum will probably be the same. MMX will probably end up as a cooked registers some day (since they provide a different view on the standard FP registers). I cannot see how I can get rid of the convert stuff for the FP registers though. On the i386 the FP registers can contain a `float', `double' or `long double' but the internal representation in the FP register is identical. Turning every FP register into three cooked registers won't work since in the debug info they will all have the same register number :-(. There is something here I don't get either. At present it is assumed that, for a given ISA/ABI, there is only one mapping from a DEBUG reg to a REGNUM. I take it, Mark, that you're saying that in reality, the mapping depends on all of: {compiler, object format, debug format, ISA/ABI} (debug reg) -> REGNUM True? Ulgh! That's another way to put it. Note that GDB allows for different mappings for each debug format. When we go multi-arch, we can easily differentiate by object format too just like for ISA/ABI. The only compiler that I have access to is GCC, so I don't know whether there are other compilers out there that use different numbering schemes. However, since there doesn't seem to be any standard, I suspect that they will, at least for the FP, SSE and MMX registers. We can probably deal with all these differences. It just means a bit more work :-(. Mark