Re: core regs vs. proc-service regs mess

Daniel Jacobowitz
2006-04-06T13:33:00Z

On Wed, Apr 05, 2006 at 10:06:44PM -0700, David S. Miller wrote:
> So something like the following patch? I didn't know what to do with
> the fpxregset stuff, I guess we'll just have to pick some random
> string for that? I couldn't find a ELF section name string assigned
> to that stuff.

It's .reg-xfp; created by bfd/elf.c:elfcore_grok_prxfpreg.

> + if (gdbarch && gdbarch_regset_from_core_section_p (gdbarch)
> + && (regset = gdbarch_regset_from_core_section (gdbarch, ".reg",
> + sizeof gregs)) != NULL)

No point testing gdbarch for NULL; it won't be. Also, I think
gdbarch_regset_from_core_section_p is enough. If that returns NULL,
then skip the regset. We don't need to cater to incomplete
implementations of the core functions.

Oh, and GDB prefers not to use assignments in if statements.

But otherwise, yeah, this is what I had in mind. Thanks.

--
Daniel Jacobowitz
CodeSourcery