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]

[patch] Fix indirect reference to deleted ser-ocd.c


Hello,

The file ocd.c would try to open the recently deleted serial device 
"ocd".  This patch fixes this problem.

Committed (as soon as I've finished checking it builds :-)
Andrew
2002-02-23  Andrew Cagney  <ac131313@redhat.com>

	* ocd.c (ocd_open): Do not try to open the "ocd" device.
	* serial.c (serial_open): Delete check for "ocd".
	Fix PR gdb/349.

Index: ocd.c
===================================================================
RCS file: /cvs/src/src/gdb/ocd.c,v
retrieving revision 1.19
diff -u -r1.19 ocd.c
--- ocd.c	2002/02/10 04:08:42	1.19
+++ ocd.c	2002/02/24 03:41:50
@@ -291,29 +291,9 @@
 
   unpush_target (current_ops);
 
-  if (strncmp (name, "wiggler", 7) == 0)
-    {
-      ocd_desc = serial_open ("ocd");
-      if (!ocd_desc)
-	perror_with_name (name);
-
-      buf[0] = OCD_LOG_FILE;
-      buf[1] = 1;		/* open new or overwrite existing WIGGLERS.LOG */
-      ocd_put_packet (buf, 2);
-      p = ocd_get_packet (buf[0], &pktlen, remote_timeout);
-
-      buf[0] = OCD_SET_CONNECTION;
-      buf[1] = 0x01;		/* atoi (name[11]); */
-      ocd_put_packet (buf, 2);
-      p = ocd_get_packet (buf[0], &pktlen, remote_timeout);
-    }
-  else
-    /* not using Wigglers.dll */
-    {
-      ocd_desc = serial_open (name);
-      if (!ocd_desc)
-	perror_with_name (name);
-    }
+  ocd_desc = serial_open (name);
+  if (!ocd_desc)
+    perror_with_name (name);
 
   if (baud_rate != -1)
     {
Index: serial.c
===================================================================
RCS file: /cvs/src/src/gdb/serial.c,v
retrieving revision 1.13
diff -u -r1.13 serial.c
--- serial.c	2001/09/26 23:27:39	1.13
+++ serial.c	2002/02/24 03:41:51
@@ -185,9 +185,7 @@
 	return scb;
       }
 
-  if (strcmp (name, "ocd") == 0)
-    ops = serial_interface_lookup ("ocd");
-  else if (strcmp (name, "pc") == 0)
+  if (strcmp (name, "pc") == 0)
     ops = serial_interface_lookup ("pc");
   else if (strchr (name, ':'))
     ops = serial_interface_lookup ("tcp");

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