aboutsummaryrefslogtreecommitdiff
path: root/gdb/rdi-share/devsw.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@cygnus>1998-09-25 19:04:46 +0000
committerKeith Seitz <keiths@cygnus>1998-09-25 19:04:46 +0000
commit69da960729726894f3323027b23de8901f09e856 (patch)
tree647741a49ecff15ea195d9f316102b6618083b36 /gdb/rdi-share/devsw.c
parent1af37f6bde766785b703ebd52378f3109fd85483 (diff)
downloadgdb-69da960729726894f3323027b23de8901f09e856.zip
gdb-69da960729726894f3323027b23de8901f09e856.tar.gz
gdb-69da960729726894f3323027b23de8901f09e856.tar.bz2
Merge with armelf980813:
* rdi-share/unixcomm.c: If using cygwin32, also use the SERPORT and PARPORT defines for win32. (Unix_MatchValidSerialDevice): For cygwin32, valid serial port names start with "com", not "/dev/tty". (Unix_OpenSerial): Do not use O_NONBLOCK on cygwin32. * rdi-share/devsw.c (DevSW_Close): Free the device's state (SwitcherState) so that the device may be reopened. * remote-rdi.c (mywritec): Send all output through gdb's *_unfiltered functions, ignoring non-ASCII chars, so that non-tty UI's can snarf the output from fputs_hook. (mywrite): Ditto. (arm_rdi_open): Set inferior_pid. (arm_rdi_detach): Pop the target off the target stack so that users can attach and detach multiple times. (arm_rdi_close): Close the opened device and reset inferior_pid, too.
Diffstat (limited to 'gdb/rdi-share/devsw.c')
-rw-r--r--gdb/rdi-share/devsw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/rdi-share/devsw.c b/gdb/rdi-share/devsw.c
index 590b812..7fa142b 100644
--- a/gdb/rdi-share/devsw.c
+++ b/gdb/rdi-share/devsw.c
@@ -265,6 +265,10 @@ AdpErrs DevSW_Close(const DeviceDescr *device, const DevChanID type)
pk = Adp_removeFromQueue(&(ds->ds_readqueue[type])))
DevSW_FreePacket(pk);
+ /* Free memory */
+ free ((char *) device->SwitcherState);
+ device->SwitcherState = 0x0;
+
/* that's all */
return adp_ok;
}