aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-tdep.c
diff options
context:
space:
mode:
authorPaul Gilliam <pgilliam@us.ibm.com>2006-11-13 17:37:36 +0000
committerPaul Gilliam <pgilliam@us.ibm.com>2006-11-13 17:37:36 +0000
commit4019046acc7d27405a762121bd962f43e44f4f7f (patch)
tree44cd12ff715e8b182f783e2cebdee9dd89ab79a5 /gdb/ppc-linux-tdep.c
parent10e14daab1f52875706c91e3cbba04ca03dab6ae (diff)
downloadgdb-4019046acc7d27405a762121bd962f43e44f4f7f.zip
gdb-4019046acc7d27405a762121bd962f43e44f4f7f.tar.gz
gdb-4019046acc7d27405a762121bd962f43e44f4f7f.tar.bz2
Fix sigtramp cache code so that PPC register are read only if there is H/W.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r--gdb/ppc-linux-tdep.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 5e1bc00..e10c614 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -916,14 +916,16 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame,
trad_frame_set_reg_addr (this_cache, tdep->ppc_cr_regnum,
gpregs + 38 * tdep->wordsize);
- /* Floating point registers. */
- for (i = 0; i < 32; i++)
- {
- int regnum = i + FP0_REGNUM;
- trad_frame_set_reg_addr (this_cache, regnum, fpregs + i * tdep->wordsize);
- }
- trad_frame_set_reg_addr (this_cache, tdep->ppc_fpscr_regnum,
- fpregs + 32 * tdep->wordsize);
+ if (ppc_floating_point_unit_p (gdbarch)) {
+ /* Floating point registers. */
+ for (i = 0; i < 32; i++)
+ {
+ int regnum = i + FP0_REGNUM;
+ trad_frame_set_reg_addr (this_cache, regnum, fpregs + i * tdep->wordsize);
+ }
+ trad_frame_set_reg_addr (this_cache, tdep->ppc_fpscr_regnum,
+ fpregs + 32 * tdep->wordsize);
+ }
trad_frame_set_id (this_cache, frame_id_build (base, func));
}