From 1d8d93deb44a8e76ded58658ba12a8782538d1af Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 28 May 2003 16:51:21 +0000 Subject: [PATCH] * configure.host, configure.tgt: Add entries for powerpc64-*-linux, selecting powerpc/ppc64-linux.mh and powerpc/linux.mt. * config/powerpc/ppc64-linux.mh, config/powerpc/nm-ppc64-linux.mh: New files. * 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. --- gdb/configure.host | 2 ++ gdb/configure.tgt | 1 + gdb/ppc-linux-nat.c | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/gdb/configure.host b/gdb/configure.host index 8f96b0a842c..0268a871af0 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -120,6 +120,8 @@ powerpc-*-aix*) gdb_host=aix432 ;; powerpc-*-linux*) gdb_host=linux ;; powerpc-*-netbsd*) gdb_host=nbsd ;; +powerpc64-*-linux*) gdb_host=ppc64-linux ;; + rs6000-*-lynxos*) gdb_host=rs6000lynx ;; rs6000-*-aix4*) gdb_host=aix4 ;; rs6000-*-*) gdb_host=rs6000 ;; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 955b3a47a69..cee1807044f 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -194,6 +194,7 @@ powerpc-*-aix*) gdb_target=aix ;; powerpc-*-linux*) gdb_target=linux build_gdbserver=yes ;; +powerpc64-*-linux*) gdb_target=linux ;; powerpc-*-vxworks*) gdb_target=vxworks ;; powerpc*-*-*) if test -f ../sim/ppc/Makefile; then gdb_target=ppc-sim diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 20c8adda44a..97febe042ee 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); } -- 2.47.2