* utils.c (quit): Also call gdb_flush on standard output and error.
[deliverable/binutils-gdb.git] / gdb / remote-adapt.c
index 390466d7bbd30ef73fc82c60d8939c45cda5141c..575bb6f66d47cabca54069f06b937bd91910bfea 100644 (file)
@@ -54,23 +54,13 @@ static void adapt_store_registers ();
 static void adapt_close ();
 static int  adapt_clear_breakpoints();
 
-/* 
- * Processor types. It is assumed that the adapt has the correct 
- * ROM for the given processor. 
- */
-#define TYPE_UNKNOWN   0
-#define TYPE_A29000    1
-#define TYPE_A29030    2
-#define TYPE_A29050    3
-static char *processor_name[] = { "Unknown", "A29000", "A29030", "A29050" };
-static int processor_type=TYPE_UNKNOWN;
-
 #define FREEZE_MODE    (read_register(CPS_REGNUM) && 0x400) 
-#define USE_SHADOW_PC   ((processor_type == TYPE_A29050) && FREEZE_MODE)
+#define USE_SHADOW_PC  ((processor_type == a29k_freeze_mode) && FREEZE_MODE)
 
 /* Can't seem to get binary coff working */
 #define ASCII_COFF             /* Adapt will be downloaded with ascii coff */
 
+/* FIXME: Replace with `set remotedebug'.  */
 #define LOG_FILE "adapt.log"
 #if defined (LOG_FILE)
 FILE *log_file=NULL;
@@ -570,28 +560,12 @@ the baud rate, and the name of the program to run on the remote system.");
   /* Clear any break points */
   adapt_clear_breakpoints();
 
-  /* Determine the processor revision level */
-  prl = (unsigned int)read_register(CFG_REGNUM) >> 24;
-  if (prl == 0x03) { 
-       processor_type = TYPE_A29000;  
-  } else if ((prl&0xf0) == 0x40) {     /* 29030 = 0x4* */
-       processor_type = TYPE_A29030;  
-       fprintf_filtered(stderr,"WARNING: debugging of A29030 not tested.\n");
-  } else if ((prl&0xf0) == 0x20) {     /* 29050 = 0x2* */
-       processor_type = TYPE_A29050;  
-       fprintf_filtered(stderr,"WARNING: debugging of A29050 not tested.\n");
-  } else {
-       processor_type = TYPE_UNKNOWN;  
-       fprintf_filtered(stderr,"WARNING: processor type unknown.\n");
-  }
-
   /* Print out some stuff, letting the user now what's going on */
-  printf_filtered("Remote debugging on an %s connect to an Adapt via %s.\n",
-               processor_name[processor_type],dev_name);
+  printf_filtered("Connected to an Adapt via %s.\n", dev_name);
     /* FIXME: can this restriction be removed? */
   printf_filtered("Remote debugging using virtual addresses works only\n");
   printf_filtered("\twhen virtual addresses map 1:1 to physical addresses.\n"); 
-  if (processor_type != TYPE_A29050) {
+  if (processor_type != a29k_freeze_mode) {
        fprintf_filtered(stderr,
        "Freeze-mode debugging not available, and can only be done on an A29050.\n");
   }
@@ -1331,7 +1305,7 @@ adapt_com (args, fromtty)
                break;
        /* Begin commands that take input in the form 'c x,y[,z...]' */
        case 'S':       /* Set memory or register */
-               if (index(args,',')) {  /* Assume it is properly formatted */
+               if (strchr(args,',')) { /* Assume it is properly formatted */
                        write(adapt_desc,args,strlen(args));
                        write(adapt_desc,"\r",1);
                        expect_prompt();
This page took 0.02389 seconds and 4 git commands to generate.