I’m a gcc developer doing gdb work because I got tired of waiting for someone else to do it. I don’t have a good understanding of how this stuff works. I’m learning as I go along. But as far as I know, the linux kernel puts the integer regs in the .reg section and the FP regs in the .reg2 section, and the only other info gdb has is the section sizes, from which we can compute whether these are 32-bit registers or 64-bit registers. I looked at half a dozen linux targets and they all work this way. This is of course linux specific. It would be possible to have core file support for other operating systems where the core file is structured differently. But if it is linux you care about, then you should be following the core file format used by the linux kernel.
I don’t know anything about note sections in a core file. I haven’t needed to learn that yet.
I’m doing the gdb work on a 64-bit Unleashed, so that is the only thing I’ve tested, and probably the only linux target it works for. I’ve tried to add in 32-bit support where appropriate, but I haven’t been able to test any of it. I haven’t tried to do anything interesting in the core file support. But as mentioned above, we can check the section sizes, and do appropriate things from that, e.g. treat the int regs as 32-bit or 64-bit based on section size, and likewise for the FP regs. That solves part of the problem. If you need something more complicated then I probably can’t help much, as I would need a lot of time to learn more about how gdb and core files work.