This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Hi!

On Wed, 29 Feb 2012 22:09:32 -0700, Kevin Buettner <kevinb@redhat.com> wrote:
> 	* sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register
> 	unless it exists for this architecture.

Your reasoning and this patch look good to me.  (But I didn't test it.)
Basically, you now relay the test to sh_register_reggroup_p, which
already contains the FPSCR existence test you first proposed.  (The same
test exists in arch-utils.c:legacy_register_sim_regno, by the way.)

Still learning about GDB's code layout -- is there any benefit in
invoking gdbarch_register_reggroup_p (as you're doing) in contrast to
directly going for sh_register_reggroup_p?

Also, we assume that simply passing 0 for fpscr to sh_analyze_prologue
doesn't do any harm (which it doesn't).  (Worth a comment, perhaps?)


GrÃÃe,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]