This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ppc64-linux] Cope with non-existent MQ register


2003-05-14  James 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.

Index: gdb/ppc-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v
retrieving revision 1.21
retrieving revision 1.21.6.1
diff -c -r1.21 -r1.21.6.1
*** gdb/ppc-linux-nat.c	8 May 2003 20:52:48 -0000	1.21
--- gdb/ppc-linux-nat.c	28 May 2003 16:51:21 -0000	1.21.6.1
***************
*** 147,154 ****
--- 147,156 ----
      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,511 ****
--- 505,515 ----
      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);
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]