summaryrefslogtreecommitdiff
path: root/gdb/rdi-share
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>2000-01-06 03:07:20 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>2000-01-06 03:07:20 +0000
commit1961aa2638e1c11c166de668e780a4385b724265 (patch)
treef6ee7ff39bd6a3525560cdf62b30748be2a6f33d /gdb/rdi-share
parent3cee212a702cfb7f44caebf7a6389e17771a3072 (diff)
downloadgdb-1961aa2638e1c11c166de668e780a4385b724265.tar.gz
import gdb-2000-01-05 snapshot
Diffstat (limited to 'gdb/rdi-share')
-rw-r--r--gdb/rdi-share/ardi.c10
-rw-r--r--gdb/rdi-share/devsw.c34
-rw-r--r--gdb/rdi-share/devsw.h6
-rw-r--r--gdb/rdi-share/etherdrv.c11
4 files changed, 47 insertions, 14 deletions
diff --git a/gdb/rdi-share/ardi.c b/gdb/rdi-share/ardi.c
index f55d636450a..3805352150a 100644
--- a/gdb/rdi-share/ardi.c
+++ b/gdb/rdi-share/ardi.c
@@ -11,8 +11,8 @@
* Angel Remote Debug Interface
*
*
- * $Revision: 1.5 $
- * $Date: 1999/11/01 15:29:56 $
+ * $Revision: 1.6 $
+ * $Date: 2000/01/05 11:22:21 $
*
* This file is based on /plg/pisd/rdi.c, but instead of using RDP it uses
* ADP messages.
@@ -392,6 +392,7 @@ static void (*old_handler)();
#endif
static bool boot_interrupted = FALSE;
+static volatile bool interrupt_request = FALSE;
static void ardi_sigint_handler(int sig) {
#ifdef DEBUG
@@ -401,6 +402,7 @@ static void ardi_sigint_handler(int sig) {
IGNORE(sig);
#endif
boot_interrupted = TRUE;
+ interrupt_request = TRUE;
#ifndef __unix
signal(SIGINT, ardi_sigint_handler);
#endif
@@ -1306,7 +1308,6 @@ static int HandleStoppedMessage(Packet *packet, void *stateptr) {
return RDIError_NoError;
}
-static volatile bool interrupt_request = FALSE;
static void interrupt_target( void )
{
@@ -1397,6 +1398,7 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
angel_DebugPrint("Waiting for program to finish...\n");
#endif
+ signal(SIGINT, ardi_sigint_handler);
while( executing )
{
if (interrupt_request)
@@ -1406,6 +1408,8 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
}
Adp_AsynchronousProcessing( async_block_on_nothing );
}
+ signal(SIGINT, SIG_IGN);
+
#ifdef TEST_DC_APPL
Adp_Install_DC_Appl_Handler( NULL );
diff --git a/gdb/rdi-share/devsw.c b/gdb/rdi-share/devsw.c
index 3afa6cde1be..2cb377d75be 100644
--- a/gdb/rdi-share/devsw.c
+++ b/gdb/rdi-share/devsw.c
@@ -8,8 +8,8 @@
/* -*-C-*-
*
- * $Revision: 1.5 $
- * $Date: 1999/11/02 11:28:53 $
+ * $Revision: 1.7 $
+ * $Date: 2000/01/04 14:56:32 $
*
*/
#include <stdio.h>
@@ -17,6 +17,7 @@
#include <string.h>
#include "adp.h"
+#include "sys.h"
#include "hsys.h"
#include "rxtx.h"
#include "drivers.h"
@@ -107,6 +108,7 @@ static void dumpPacket(FILE *fp, char *label, struct data_packet *p)
{
unsigned r;
int i;
+ unsigned char channel;
if (!fp)
return;
@@ -116,12 +118,14 @@ static void dumpPacket(FILE *fp, char *label, struct data_packet *p)
fprintf(fp,"%02x ",p->data[i]);
fprintf(fp,"\n");
+ channel = p->data[0];
+
r = WordAt(p->data+4);
fprintf(fp,"R=%08x ",r);
fprintf(fp,"%s ", r&0x80000000 ? "H<-T" : "H->T");
- switch ((r>>16) & 0xff)
+ switch (channel)
{
case CI_PRIVATE: fprintf(fp,"CI_PRIVATE: "); break;
case CI_HADP: fprintf(fp,"CI_HADP: "); break;
@@ -176,6 +180,28 @@ static void dumpPacket(FILE *fp, char *label, struct data_packet *p)
case ADP_Stopped: fprintf(fp," ADP_Stopped "); break;
case ADP_TDCC_ToHost: fprintf(fp," ADP_TDCC_ToHost "); break;
case ADP_TDCC_FromHost: fprintf(fp," ADP_TDCC_FromHost "); break;
+
+ case CL_Unrecognised: fprintf(fp," CL_Unrecognised "); break;
+ case CL_WriteC: fprintf(fp," CL_WriteC "); break;
+ case CL_Write0: fprintf(fp," CL_Write0 "); break;
+ case CL_ReadC: fprintf(fp," CL_ReadC "); break;
+ case CL_System: fprintf(fp," CL_System "); break;
+ case CL_GetCmdLine: fprintf(fp," CL_GetCmdLine "); break;
+ case CL_Clock: fprintf(fp," CL_Clock "); break;
+ case CL_Time: fprintf(fp," CL_Time "); break;
+ case CL_Remove: fprintf(fp," CL_Remove "); break;
+ case CL_Rename: fprintf(fp," CL_Rename "); break;
+ case CL_Open: fprintf(fp," CL_Open "); break;
+ case CL_Close: fprintf(fp," CL_Close "); break;
+ case CL_Write: fprintf(fp," CL_Write "); break;
+ case CL_WriteX: fprintf(fp," CL_WriteX "); break;
+ case CL_Read: fprintf(fp," CL_Read "); break;
+ case CL_ReadX: fprintf(fp," CL_ReadX "); break;
+ case CL_Seek: fprintf(fp," CL_Seek "); break;
+ case CL_Flen: fprintf(fp," CL_Flen "); break;
+ case CL_IsTTY: fprintf(fp," CL_IsTTY "); break;
+ case CL_TmpNam: fprintf(fp," CL_TmpNam "); break;
+
default: fprintf(fp," BadReason "); break;
}
@@ -410,7 +436,7 @@ AdpErrs DevSW_Match(const DeviceDescr *device, const char *name,
return (device->DeviceMatch(name, arg) == -1) ? adp_failed : adp_ok;
}
-AdpErrs DevSW_Close(const DeviceDescr *device, const DevChanID type)
+AdpErrs DevSW_Close (DeviceDescr *device, const DevChanID type)
{
DevSWState *ds = (DevSWState *)(device->SwitcherState);
Packet *pk;
diff --git a/gdb/rdi-share/devsw.h b/gdb/rdi-share/devsw.h
index 0a255f96f5f..490d6db20ab 100644
--- a/gdb/rdi-share/devsw.h
+++ b/gdb/rdi-share/devsw.h
@@ -8,8 +8,8 @@
/* -*-C-*-
*
- * $Revision: 1.3 $
- * $Date: 1999/11/01 12:11:37 $
+ * $Revision: 1.4 $
+ * $Date: 2000/01/04 14:49:02 $
*
*/
#ifndef angsd_devsw_h
@@ -160,7 +160,7 @@ AdpErrs DevSW_Match(const DeviceDescr *device, const char *name,
* OK: adp_ok
* Error: adp_device_not_open
*/
-AdpErrs DevSW_Close(const DeviceDescr *device, const DevChanID type);
+AdpErrs DevSW_Close(DeviceDescr *device, const DevChanID type);
/*
* Function: DevSW_Read
diff --git a/gdb/rdi-share/etherdrv.c b/gdb/rdi-share/etherdrv.c
index 72e44fdc545..16f72e7e401 100644
--- a/gdb/rdi-share/etherdrv.c
+++ b/gdb/rdi-share/etherdrv.c
@@ -8,8 +8,8 @@
/* -*-C-*-
*
- * $Revision: 1.8 $
- * $Date: 1999/11/01 15:32:58 $
+ * $Revision: 1.9 $
+ * $Date: 2000/01/04 15:24:18 $
*
*
* etherdrv.c - Ethernet Driver for Angel.
@@ -266,9 +266,12 @@ static int open_socket(void)
static void fetch_ports(void)
{
int i;
- const char ctrlpacket[] = CTRL_MAGIC;
- CtrlResponse response;
+ char ctrlpacket[10];
+ CtrlResponse response;
+ memset (ctrlpacket, 0, 10);
+ strcpy (ctrlpacket, CTRL_MAGIC);
+ memset (response, 0, sizeof(CtrlResponse));
/*
* we will try 3 times to elicit a response from the target
*/