Re: [RFC] sh-tdep.c: Don't fetch FPSCR register if it doesn't exist

Joel Brobecker
2012-03-01T01:33:40Z

> Comments? Is there a better way to test for the existence of a register?

Perhaps an idea... Apparently, this is a property of the arch, so
something relatively static. This is typically the type of information
the sh_gdbarch_init routine would save in the gdbarch_tdep structure.
You can create a new flag in that structure, and then set it at the
same time you register the register_name gdbarch hook.

> * sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register
> unless it exists for this architecture.

--
Joel