#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;
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;
}
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;
}
ops = serial_interface_lookup ("hardwire");
if (!ops)
+ {
+ DBG(("serial_open: !ops; returning NULL\n"));
return NULL;
+ }
scb = (serial_t)xmalloc (sizeof (struct _serial_t));
if (scb->ops->open(scb, name))
{
free (scb);
+ DBG(("serial_open: scb->ops->open failed!\n"));
return NULL;
}
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;
}
{
serial_t scb;
struct serial_ops *ops;
+ DBG(("serial_fdopen\n"));
for (scb = scb_base; scb; scb = scb->next)
if (scb->fd == fd)
char cur_esc = 0;
serial_ttystate ttystate;
serial_t port_desc; /* TTY port */
+ DBG(("connect_command\n"));
dont_repeat();