summaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-nat.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-06-12 23:30:40 +0000
committerJim Blandy <jimb@codesourcery.com>2003-06-12 23:30:40 +0000
commitf8c592535f6186d1a46e8270ddff7b71e867d927 (patch)
tree037ce169fa07e2648ddf7442f19ab53a779e5bf4 /gdb/ppc-linux-nat.c
parent8fbb30b1240c0eeb5d73c92f73731a788a72fea2 (diff)
downloadbinutils-gdb-f8c592535f6186d1a46e8270ddff7b71e867d927.tar.gz
* ppc-linux-nat.c (ppc_register_u_addr, fill_gregset): If PT_MQ
isn't #defined, assume the register doesn't exist: act as if tdep->ppc_mq_regnum were -1.
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r--gdb/ppc-linux-nat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index d320499fecf..e1649197e8f 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -147,8 +147,10 @@ ppc_register_u_addr (int regno)
u_addr = PT_XER * 4;
if (regno == tdep->ppc_ctr_regnum)
u_addr = PT_CTR * 4;
+#ifdef PT_MQ
if (regno == tdep->ppc_mq_regnum)
u_addr = PT_MQ * 4;
+#endif
if (regno == tdep->ppc_ps_regnum)
u_addr = PT_MSR * 4;
if (regno == tdep->ppc_fpscr_regnum)
@@ -503,9 +505,11 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
regcache_collect (tdep->ppc_xer_regnum, regp + PT_XER);
if ((regno == -1) || regno == tdep->ppc_ctr_regnum)
regcache_collect (tdep->ppc_ctr_regnum, regp + PT_CTR);
+#ifdef PT_MQ
if (((regno == -1) || regno == tdep->ppc_mq_regnum)
&& (tdep->ppc_mq_regnum != -1))
regcache_collect (tdep->ppc_mq_regnum, regp + PT_MQ);
+#endif
if ((regno == -1) || regno == tdep->ppc_ps_regnum)
regcache_collect (tdep->ppc_ps_regnum, regp + PT_MSR);
}