aboutsummaryrefslogtreecommitdiff
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
parent8fbb30b1240c0eeb5d73c92f73731a788a72fea2 (diff)
downloadgdb-f8c592535f6186d1a46e8270ddff7b71e867d927.zip
gdb-f8c592535f6186d1a46e8270ddff7b71e867d927.tar.gz
gdb-f8c592535f6186d1a46e8270ddff7b71e867d927.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/ppc-linux-nat.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bdeab02..d7029fa 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2003-06-12 Jim Blandy <jimb@redhat.com>
+ * 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.
+
* configure.host, configure.tgt: Add entries for
powerpc64-*-linux, selecting powerpc/ppc64-linux.mh and
powerpc/linux.mt.
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index d320499..e164919 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);
}