diff options
author | Nick Clifton <nickc@redhat.com> | 1998-09-15 21:03:26 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1998-09-15 21:03:26 +0000 |
commit | 9d561e1e945b437bae015d7ed60f4a338814765c (patch) | |
tree | acc050f7667a4f7cbb42741298887a5176e99cc5 /gdb/remote-rdi.c | |
parent | a2dd26e9e9091b74fcc043479dbf94751b3e1c44 (diff) | |
download | gdb-9d561e1e945b437bae015d7ed60f4a338814765c.zip gdb-9d561e1e945b437bae015d7ed60f4a338814765c.tar.gz gdb-9d561e1e945b437bae015d7ed60f4a338814765c.tar.bz2 |
prevent multiple attempts at closing remote connection.
Diffstat (limited to 'gdb/remote-rdi.c')
-rw-r--r-- | gdb/remote-rdi.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c index 2911904..6bfcb8b 100644 --- a/gdb/remote-rdi.c +++ b/gdb/remote-rdi.c @@ -181,6 +181,9 @@ mygets (arg, buffer, len) return fgets(buffer, len, stdin); } +/* Prevent multiple calls to angel_RDI_close(). */ +static int closed_already = 1; + /* Open a connection to a remote debugger. NAME is the filename used for communication. */ @@ -318,6 +321,8 @@ device is attached to the remote system (e.g. /dev/ttya)."); } printf_filtered ("Connected to ARM RDI target.\n"); + + closed_already = 0; } /* Start an inferior process and set inferior_pid to its pid. @@ -414,10 +419,14 @@ arm_rdi_close (quitting) { int rslt; - rslt = angel_RDI_close (); - if (rslt) + if (! closed_already) { - printf_filtered ("RDI_close: %s\n", rdi_error_message (rslt)); + rslt = angel_RDI_close (); + if (rslt) + { + printf_filtered ("RDI_close: %s\n", rdi_error_message (rslt)); + } + closed_already = 1; } } |