• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révisiona9205f4fc3d1611bf1aa29dcebe1395c627ae98c (tree)
l'heure2020-01-10 23:53:36
AuteurPedro Alves <palves@redh...>
CommiterPedro Alves

Message de Log

Revert 'Remove unused struct serial::name field'

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:
yyyy-mm-dd 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.

Change Summary

Modification

--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -247,6 +247,7 @@ serial_open_ops_1 (const struct serial_ops *ops, const char *open_name)
247247 return NULL;
248248 }
249249
250+ scb->name = open_name != NULL ? xstrdup (open_name) : NULL;
250251 scb->next = scb_base;
251252 scb_base = scb;
252253
@@ -291,6 +292,7 @@ serial_fdopen_ops (const int fd, const struct serial_ops *ops)
291292
292293 scb = new_serial (ops);
293294
295+ scb->name = NULL;
294296 scb->next = scb_base;
295297 scb_base = scb;
296298
@@ -330,6 +332,8 @@ do_serial_close (struct serial *scb, int really_close)
330332 if (really_close)
331333 scb->ops->close (scb);
332334
335+ xfree (scb->name);
336+
333337 /* For serial_is_open. */
334338 scb->bufp = NULL;
335339
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -240,6 +240,7 @@ struct serial
240240 buffer. -ve for sticky errors. */
241241 unsigned char *bufp; /* Current byte */
242242 unsigned char buf[BUFSIZ]; /* Da buffer itself */
243+ char *name; /* The name of the device or host */
243244 struct serial *next; /* Pointer to the next `struct serial *' */
244245 int debug_p; /* Trace this serial devices operation. */
245246 int async_state; /* Async internal state. */