This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[obish] Eliminate stray NPC_REGNUM in sun core code
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 17 Jan 2004 12:09:36 -0500
- Subject: [obish] Eliminate stray NPC_REGNUM in sun core code
FYI,
I suspect this was missed - the sparc code no longer sets npc_regnum so
this needs to use the sun's tdep value.
committed,
Andrew
2004-01-17 Andrew Cagney <cagney@redhat.com>
* core-sol2.c (fetch_core_registers): Replace
DEPRECATED_NPC_REGNUM with equivalent tdep value.
Index: core-sol2.c
===================================================================
RCS file: /cvs/src/src/gdb/core-sol2.c,v
retrieving revision 1.13
diff -u -r1.13 core-sol2.c
--- core-sol2.c 2 Oct 2003 20:28:28 -0000 1.13
+++ core-sol2.c 17 Jan 2004 17:07:54 -0000
@@ -103,7 +103,7 @@
= gregs->r_ps;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)]
= gregs->r_pc;
- *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (DEPRECATED_NPC_REGNUM)]
+ *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (gdbarch_tdep (current_gdbarch)->npc_regnum)]
= gregs->r_npc;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)]
= gregs->r_y;