diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-01-12 14:19:49 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-01-12 14:19:49 -0500 |
commit | 16e9019ef738c251ecfbed512c6835f0f0a424f7 (patch) | |
tree | c01b11eb7ad1f8bd4817a773eaa9c52853899dde /gdb | |
parent | 3f94e588596cdca710de71735127560788fd8770 (diff) | |
download | gdb-16e9019ef738c251ecfbed512c6835f0f0a424f7.zip gdb-16e9019ef738c251ecfbed512c6835f0f0a424f7.tar.gz gdb-16e9019ef738c251ecfbed512c6835f0f0a424f7.tar.bz2 |
gdb: move baud_rate and serial_parity declarations to serial.h
They are currently in target.h, it would make more sense to have them in
serial.h, since they are defined in serial.c.
gdb/ChangeLog:
* target.h (baud_rate, serial_parity): Move declarations...
* serial.h: ... here.
* main.c: Include serial.h.
* serial.c (baud_rate, serial_parity): Update doc.
Change-Id: Idc983c154c80ccc29b07ce68df3483cefe03fb71
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/main.c | 1 | ||||
-rw-r--r-- | gdb/serial.c | 7 | ||||
-rw-r--r-- | gdb/serial.h | 8 | ||||
-rw-r--r-- | gdb/target.h | 6 |
5 files changed, 18 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 88d605f..42ef34a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2021-01-12 Simon Marchi <simon.marchi@polymtl.ca> + * target.h (baud_rate, serial_parity): Move declarations... + * serial.h: ... here. + * main.c: Include serial.h. + * serial.c (baud_rate, serial_parity): Update doc. + +2021-01-12 Simon Marchi <simon.marchi@polymtl.ca> + * top.c (pre_init_ui_hook): Remove. 2021-01-12 Srinath Parvathaneni <srinath.parvathaneni@arm.com> @@ -54,6 +54,7 @@ #endif #include "gdbsupport/alt-stack.h" #include "observable.h" +#include "serial.h" /* The selected interpreter. This will be used as a set command variable, so it should always be malloc'ed - since diff --git a/gdb/serial.c b/gdb/serial.c index 4b75178..1854721 100644 --- a/gdb/serial.c +++ b/gdb/serial.c @@ -623,10 +623,7 @@ serial_pipe (struct serial *scbs[2]) static struct cmd_list_element *serial_set_cmdlist; static struct cmd_list_element *serial_show_cmdlist; -/* Baud rate specified for talking to serial target systems. Default - is left as -1, so targets can choose their own defaults. */ -/* FIXME: This means that "show serial baud" and gr_files_info can - print -1 or (unsigned int)-1. This is a Bad User Interface. */ +/* See serial.h. */ int baud_rate = -1; @@ -638,7 +635,7 @@ serial_baud_show_cmd (struct ui_file *file, int from_tty, value); } -/* Parity for serial port. */ +/* See serial.h. */ int serial_parity = GDBPARITY_NONE; diff --git a/gdb/serial.h b/gdb/serial.h index d9f5d4b..9a80049 100644 --- a/gdb/serial.h +++ b/gdb/serial.h @@ -36,6 +36,14 @@ typedef void *serial_ttystate; struct serial; struct serial_ops; +/* Speed in bits per second, or -1 which means don't mess with the speed. */ + +extern int baud_rate; + +/* Parity for serial port */ + +extern int serial_parity; + /* Create a new serial for OPS. The new serial is not opened. */ /* Try to open NAME. Returns a new `struct serial *' on success, NULL diff --git a/gdb/target.h b/gdb/target.h index e1a1d7a..40bf416 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -2477,12 +2477,6 @@ extern gdb::optional<gdb::char_vector> target_get_osdata (const char *type); information (higher values, more information). */ extern int remote_debug; -/* Speed in bits per second, or -1 which means don't mess with the speed. */ -extern int baud_rate; - -/* Parity for serial port */ -extern int serial_parity; - /* Timeout limit for response from target. */ extern int remote_timeout; |