]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: move baud_rate and serial_parity declarations to serial.h
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 12 Jan 2021 19:19:49 +0000 (14:19 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 12 Jan 2021 19:19:49 +0000 (14:19 -0500)
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

gdb/ChangeLog
gdb/main.c
gdb/serial.c
gdb/serial.h
gdb/target.h

index 88d605fa1c61e408704a87718614dda1011b1e7f..42ef34a3b2496f574e5efc2c1c58ebbe92ef991b 100644 (file)
@@ -1,3 +1,10 @@
+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.
index 9e52c4153656da1b065471ab601349a217ceb06e..1e1fbf2f351211abb6156f236c2221ddb38016c7 100644 (file)
@@ -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
index 4b75178021b3842cbf5cd8323b1741a112399759..1854721d7ed601292f9a9fbb5069ad24b9a17823 100644 (file)
@@ -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;
 
index d9f5d4ba5ef99b49831ea98c04e0a9a395b40313..9a800491afff174b6cf0d06678b99f6e241cf5e3 100644 (file)
@@ -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
index e1a1d7a9226b493a8f42a0c981c1f0022f62d9d2..40bf416cd6779a718048a56e14b191f380f3f829 100644 (file)
@@ -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;