+2012-03-02 Kevin Buettner <kevinb@redhat.com>
+
+ * sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register
+ unless it exists for this architecture.
+
2012-03-02 Joel Brobecker <brobecker@adacore.com>
* language.h (struct language_defn): New "method" la_read_var_value.
if (cache->pc != 0)
{
ULONGEST fpscr;
- fpscr = get_frame_register_unsigned (this_frame, FPSCR_REGNUM);
+
+ /* Check for the existence of the FPSCR register. If it exists,
+ fetch its value for use in prologue analysis. Passing a zero
+ value is the best choice for architecture variants upon which
+ there's no FPSCR register. */
+ if (gdbarch_register_reggroup_p (gdbarch, FPSCR_REGNUM, all_reggroup))
+ fpscr = get_frame_register_unsigned (this_frame, FPSCR_REGNUM);
+ else
+ fpscr = 0;
+
sh_analyze_prologue (gdbarch, cache->pc, current_pc, cache, fpscr);
}