This commit reverts:
commit
5f5219fc34f7557296272230123a3837960a6f09
Author: Pedro Alves <palves@redhat.com>
AuthorDate: Tue Apr 12 16:49:30 2016 +0100
Remove unused struct serial::name field
The following patches will add uses for the field.
gdb/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
Revert:
2016-04-12 Pedro Alves <palves@redhat.com>
* serial.c (serial_open, serial_fdopen_ops, do_serial_close):
Remove references to name.
* serial.h (struct serial) <name>: Delete.
+2020-01-10 Pedro Alves <palves@redhat.com>
+
+ Revert:
+ 2016-04-12 Pedro Alves <palves@redhat.com>
+ * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
+ Remove references to name.
+ * serial.h (struct serial) <name>: Delete.
+
2020-01-10 Pedro Alves <palves@redhat.com>
* gdbarch-selftests.c (register_to_value_test): Remove "target
return NULL;
}
+ scb->name = open_name != NULL ? xstrdup (open_name) : NULL;
scb->next = scb_base;
scb_base = scb;
scb = new_serial (ops);
+ scb->name = NULL;
scb->next = scb_base;
scb_base = scb;
if (really_close)
scb->ops->close (scb);
+ xfree (scb->name);
+
/* For serial_is_open. */
scb->bufp = NULL;
buffer. -ve for sticky errors. */
unsigned char *bufp; /* Current byte */
unsigned char buf[BUFSIZ]; /* Da buffer itself */
+ char *name; /* The name of the device or host */
struct serial *next; /* Pointer to the next `struct serial *' */
int debug_p; /* Trace this serial devices operation. */
int async_state; /* Async internal state. */