diff options
author | Dawn Perchik <dawn@cygnus> | 1997-02-12 10:27:11 +0000 |
---|---|---|
committer | Dawn Perchik <dawn@cygnus> | 1997-02-12 10:27:11 +0000 |
commit | 16a43bf443c8e2ab7fc9d35e131d6a3d773149b6 (patch) | |
tree | 9b78fdc456dfb492e00d1f10f97c26b4d647e469 /gdb/serial.c | |
parent | 6fb47af03652d5d32a4d46f91a7f3771d0aecdbd (diff) | |
download | gdb-16a43bf443c8e2ab7fc9d35e131d6a3d773149b6.zip gdb-16a43bf443c8e2ab7fc9d35e131d6a3d773149b6.tar.gz gdb-16a43bf443c8e2ab7fc9d35e131d6a3d773149b6.tar.bz2 |
* defs.h: Fix cntl-C to read from the Windows message queue.
Add prototypes for make_final_cleanup (and the other cleanup
routines.
* remote-e7000.c: Fix sync code to timeout if unable to sync.
Change sync code to report status while trying to sync-up
with hardware. Add debugging output and document.
* ser-e7kpc.c: Swap order of len & offset to match implementation.
Add debugging output and document.
* serial.c: Add debugging output.
* top.c: Add call to do_final_cleanups.
Remove conditionals preventing Win32 from getting SIGQUIT.
* utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup
chain as a parameter. Extract this generic code from the cleanup
routines into separate funtions (*_my_cleanup). Keep old
functionality by passing "cleanup_chain" to the new funtions.
Define the cleanup chain "final_cleanup_chain" to be a cleanup
chain which will be executed only when gdb exits. Add functions
(*_final_cleanup) to match the original (*_cleanup) functions.
(pollquit, quit, notice_quit): Fix to read cntl-C from the
Windows message queue.
Diffstat (limited to 'gdb/serial.c')
-rw-r--r-- | gdb/serial.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/serial.c b/gdb/serial.c index c30fda6..9e9ec82 100644 --- a/gdb/serial.c +++ b/gdb/serial.c @@ -23,6 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "gdb_string.h" #include "gdbcmd.h" +//#define DEBUGIFY +#include "debugify.h" + + /* Linked list of serial I/O handlers */ static struct serial_ops *serial_ops_list = NULL; @@ -206,11 +210,13 @@ serial_interface_lookup (name) char *name; { struct serial_ops *ops; + DBG(("serial_interface_lookup(%s)\n",name)); for (ops = serial_ops_list; ops; ops = ops->next) if (strcmp (name, ops->name) == 0) return ops; + DBG(("serial_interface_lookup: %s not found!\n",name)); return NULL; } @@ -231,10 +237,12 @@ serial_open (name) serial_t scb; struct serial_ops *ops; + DBG(("serial_open\n")); for (scb = scb_base; scb; scb = scb->next) if (scb->name && strcmp (scb->name, name) == 0) { scb->refcnt++; + DBG(("serial_open: scb %s found\n", name)); return scb; } @@ -248,7 +256,10 @@ serial_open (name) ops = serial_interface_lookup ("hardwire"); if (!ops) + { + DBG(("serial_open: !ops; returning NULL\n")); return NULL; + } scb = (serial_t)xmalloc (sizeof (struct _serial_t)); @@ -260,6 +271,7 @@ serial_open (name) if (scb->ops->open(scb, name)) { free (scb); + DBG(("serial_open: scb->ops->open failed!\n")); return NULL; } @@ -275,10 +287,12 @@ serial_open (name) serial_logfp = fopen (serial_logfile, "w"); if (serial_logfp == NULL) { + DBG(("serial_open: unable to open serial logfile %s!\n",serial_logfile)); perror_with_name (serial_logfile); } } + DBG(("serial_open: Done! :-)\n")); return scb; } @@ -288,6 +302,7 @@ serial_fdopen (fd) { serial_t scb; struct serial_ops *ops; + DBG(("serial_fdopen\n")); for (scb = scb_base; scb; scb = scb->next) if (scb->fd == fd) @@ -413,6 +428,7 @@ connect_command (args, fromtty) char cur_esc = 0; serial_ttystate ttystate; serial_t port_desc; /* TTY port */ + DBG(("connect_command\n")); dont_repeat(); |