This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] sh-tdep.c: Don't fetch FPSCR register if it doesn't exist
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Thomas Schwinge <thomas at schwinge dot name>
- Date: Wed, 29 Feb 2012 17:33:18 -0800
- Subject: Re: [RFC] sh-tdep.c: Don't fetch FPSCR register if it doesn't exist
- References: <20120229173408.78699013@mesquite.lan>
> 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