aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-udi.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-10-25 22:24:02 +0000
committerStu Grossman <grossman@cygnus>1993-10-25 22:24:02 +0000
commitb58a197344d539b878e5c0c5cdb90dba4e8f9feb (patch)
treeb0b95965cda3f99f5ce0118abd064a1e9e80dda5 /gdb/remote-udi.c
parent3c1423d6458909187ccf6257f4ce97be5f99dc0c (diff)
downloadfsf-binutils-gdb-b58a197344d539b878e5c0c5cdb90dba4e8f9feb.zip
fsf-binutils-gdb-b58a197344d539b878e5c0c5cdb90dba4e8f9feb.tar.gz
fsf-binutils-gdb-b58a197344d539b878e5c0c5cdb90dba4e8f9feb.tar.bz2
* infrun.c (wait_for_inferior): Fix PC out of subroutine bounds
check to use prev_func_start/end instead of stop_func_start/end. * remote-udi.c (store_register): Invalidate NPC/PC_REGNUM after changing PC.
Diffstat (limited to 'gdb/remote-udi.c')
-rw-r--r--gdb/remote-udi.c38
1 files changed, 30 insertions, 8 deletions
diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c
index 536d743..aaf752f 100644
--- a/gdb/remote-udi.c
+++ b/gdb/remote-udi.c
@@ -573,6 +573,8 @@ udi_pc()
UDIBool HostEndian = 0;
UDIError err;
int pc[2];
+ unsigned long myregs[256];
+ int i;
From.Space = UDI29KPC;
From.Offset = 0;
@@ -589,6 +591,21 @@ udi_pc()
printf("other pc1 = 0x%x, pc0 = 0x%x\n", *(int *)&registers[4 * PC_REGNUM],
*(int *)&registers[4 * NPC_REGNUM]);
+ /* Now, read all the registers globally */
+
+ From.Space = UDI29KGlobalRegs;
+ From.Offset = 0;
+ err = UDIRead(From, myregs, 256, 4, &CountDone, HostEndian);
+
+ printf ("err = %d, CountDone = %d\n", err, CountDone);
+
+ printf("\n");
+
+ for (i = 0; i < 256; i += 2)
+ printf("%d:\t%#10x\t%11d\t%#10x\t%11d\n", i, myregs[i], myregs[i],
+ myregs[i+1], myregs[i+1]);
+ printf("\n");
+
return pc[0];
}
#endif
@@ -1437,6 +1454,11 @@ store_register (regno)
To.Space = UDI29KPC;
To.Offset = 0; /* PC1 */
result = UDIWrite (&From, To, Count, Size, &CountDone, HostEndian);
+
+ /* Writing to this loc actually changes the values of pc0 & pc1 */
+
+ register_valid[PC_REGNUM] = 0; /* pc1 */
+ register_valid[NPC_REGNUM] = 0; /* pc0 */
}
else /* An unprotected or protected special register */
{
@@ -1525,6 +1547,14 @@ void convert32() {;}
FILE* EchoFile = 0; /* used for debugging */
int QuietMode = 0; /* used for debugging */
+#ifdef NO_HIF_SUPPORT
+service_HIF(msg)
+ union msg_t *msg;
+{
+ return(0); /* Emulate a failure */
+}
+#endif
+
/* Target_ops vector. Not static because there does not seem to be
any portable way to do a forward declaration of a static variable.
The RS/6000 doesn't like "extern" followed by "static"; SunOS
@@ -1594,11 +1624,3 @@ _initialize_remote_udi ()
{
add_target (&udi_ops);
}
-
-#ifdef NO_HIF_SUPPORT
-service_HIF(msg)
-union msg_t *msg;
-{
- return(0); /* Emulate a failure */
-}
-#endif