diff options
author | Kevin Buettner <kevinb@redhat.com> | 2012-03-03 01:27:47 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2012-03-03 01:27:47 +0000 |
commit | 9fc056857823ff58f0f41eb857f65f53ce43e5b5 (patch) | |
tree | 606e172aa864bf921e8748b570471a8a72d02280 | |
parent | d98bfeb0233c622e936bdda16ff03277077f5ca2 (diff) | |
download | fsf-binutils-gdb-9fc056857823ff58f0f41eb857f65f53ce43e5b5.zip fsf-binutils-gdb-9fc056857823ff58f0f41eb857f65f53ce43e5b5.tar.gz fsf-binutils-gdb-9fc056857823ff58f0f41eb857f65f53ce43e5b5.tar.bz2 |
* sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register
unless it exists for this architecture.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a26e694..6cf9ab4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index e65aeb4..3983632 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -2554,7 +2554,16 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache) 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); } |