* [PATCH 1/2] gdb: move baud_rate and serial_parity declarations to serial.h
@ 2021-01-12 5:44 Simon Marchi via Gdb-patches
2021-01-12 5:44 ` [PATCH 2/2] gdb: move read{now, never}_symbol_files declarations to symfile.h Simon Marchi via Gdb-patches
0 siblings, 1 reply; 6+ messages in thread
From: Simon Marchi via Gdb-patches @ 2021-01-12 5:44 UTC (permalink / raw)
To: gdb-patches
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/main.c | 1 +
gdb/serial.c | 7 ++-----
gdb/serial.h | 8 ++++++++
gdb/target.h | 6 ------
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/gdb/main.c b/gdb/main.c
index 9e52c4153656..1e1fbf2f3512 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -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 4b75178021b3..1854721d7ed6 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 d9f5d4ba5ef9..9a800491afff 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 e1a1d7a9226b..40bf416cd677 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;
--
2.29.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] gdb: move read{now, never}_symbol_files declarations to symfile.h
2021-01-12 5:44 [PATCH 1/2] gdb: move baud_rate and serial_parity declarations to serial.h Simon Marchi via Gdb-patches
@ 2021-01-12 5:44 ` Simon Marchi via Gdb-patches
2021-01-12 14:58 ` Christian Biesinger via Gdb-patches
0 siblings, 1 reply; 6+ messages in thread
From: Simon Marchi via Gdb-patches @ 2021-01-12 5:44 UTC (permalink / raw)
To: gdb-patches
... since they are defined in symfile.c.
gdb/ChangeLog:
* top.h (readnow_symbol_files, readnever_symbol_files): Move
declarations to ...
* symfile.h: ... here.
* symfile.c: Update doc.
Change-Id: Ie35a80d236bea70947bc496f66f62c8c621670b4
---
gdb/symfile.c | 10 ++++++++--
gdb/symfile.h | 4 ++++
gdb/top.h | 4 ----
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 82693f913672..ec5d34ac7833 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -85,8 +85,14 @@ using clear_symtab_users_cleanup
= FORWARD_SCOPE_EXIT (clear_symtab_users);
/* Global variables owned by this file. */
-int readnow_symbol_files; /* Read full symbols immediately. */
-int readnever_symbol_files; /* Never read full symbols. */
+
+/* See symfile.h. */
+
+int readnow_symbol_files;
+
+/* See symfile.h. */
+
+int readnever_symbol_files;
/* Functions this file defines. */
diff --git a/gdb/symfile.h b/gdb/symfile.h
index a6f8fafc8952..f1ce75457d67 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -641,4 +641,8 @@ extern gdb_bfd_ref_ptr find_separate_debug_file_in_section (struct objfile *);
extern bool separate_debug_file_debug;
+extern int readnow_symbol_files;
+extern int readnever_symbol_files;
+
+
#endif /* !defined(SYMFILE_H) */
diff --git a/gdb/top.h b/gdb/top.h
index a08f448778ac..a31b19ae9542 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -273,10 +273,6 @@ extern void set_prompt (const char *s);
extern int gdb_in_secondary_prompt_p (struct ui *ui);
-/* From random places. */
-extern int readnow_symbol_files;
-extern int readnever_symbol_files;
-
/* Perform _initialize initialization. */
extern void gdb_init (char *);
--
2.29.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] gdb: move read{now, never}_symbol_files declarations to symfile.h
2021-01-12 5:44 ` [PATCH 2/2] gdb: move read{now, never}_symbol_files declarations to symfile.h Simon Marchi via Gdb-patches
@ 2021-01-12 14:58 ` Christian Biesinger via Gdb-patches
2021-01-12 15:42 ` Simon Marchi via Gdb-patches
0 siblings, 1 reply; 6+ messages in thread
From: Christian Biesinger via Gdb-patches @ 2021-01-12 14:58 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
On Tue, Jan 12, 2021 at 6:44 AM Simon Marchi via Gdb-patches
<gdb-patches@sourceware.org> wrote:
> -int readnow_symbol_files; /* Read full symbols immediately. */
> -int readnever_symbol_files; /* Never read full symbols. */
Looks like these comments didn't make it into the header file?
(It also seems like these should be bool, though I understand that's a
bigger change)
Christian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] gdb: move read{now, never}_symbol_files declarations to symfile.h
2021-01-12 14:58 ` Christian Biesinger via Gdb-patches
@ 2021-01-12 15:42 ` Simon Marchi via Gdb-patches
2021-01-12 18:28 ` Tom Tromey
0 siblings, 1 reply; 6+ messages in thread
From: Simon Marchi via Gdb-patches @ 2021-01-12 15:42 UTC (permalink / raw)
To: Christian Biesinger; +Cc: gdb-patches
On 2021-01-12 9:58 a.m., Christian Biesinger wrote:
> On Tue, Jan 12, 2021 at 6:44 AM Simon Marchi via Gdb-patches
> <gdb-patches@sourceware.org> wrote:
>> -int readnow_symbol_files; /* Read full symbols immediately. */
>> -int readnever_symbol_files; /* Never read full symbols. */
>
> Looks like these comments didn't make it into the header file?
>
> (It also seems like these should be bool, though I understand that's a
> bigger change)
>
> Christian
>
Oh, I must have failed to add/commit them. Fixed locally, thanks!
Simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] gdb: move read{now, never}_symbol_files declarations to symfile.h
2021-01-12 15:42 ` Simon Marchi via Gdb-patches
@ 2021-01-12 18:28 ` Tom Tromey
2021-01-12 19:20 ` Simon Marchi via Gdb-patches
0 siblings, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2021-01-12 18:28 UTC (permalink / raw)
To: Simon Marchi via Gdb-patches
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
Simon> Oh, I must have failed to add/commit them. Fixed locally, thanks!
FWIW I am sure the updated patches are fine & unobjectionable & should
just go right in.
thanks,
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] gdb: move read{now, never}_symbol_files declarations to symfile.h
2021-01-12 18:28 ` Tom Tromey
@ 2021-01-12 19:20 ` Simon Marchi via Gdb-patches
0 siblings, 0 replies; 6+ messages in thread
From: Simon Marchi via Gdb-patches @ 2021-01-12 19:20 UTC (permalink / raw)
To: Tom Tromey, Simon Marchi via Gdb-patches
On 2021-01-12 1:28 p.m., Tom Tromey wrote:
> Simon> Oh, I must have failed to add/commit them. Fixed locally, thanks!
>
> FWIW I am sure the updated patches are fine & unobjectionable & should
> just go right in.
>
> thanks,
> Tom
Yeah, probably - pushed!
Simon
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-12 19:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 5:44 [PATCH 1/2] gdb: move baud_rate and serial_parity declarations to serial.h Simon Marchi via Gdb-patches
2021-01-12 5:44 ` [PATCH 2/2] gdb: move read{now, never}_symbol_files declarations to symfile.h Simon Marchi via Gdb-patches
2021-01-12 14:58 ` Christian Biesinger via Gdb-patches
2021-01-12 15:42 ` Simon Marchi via Gdb-patches
2021-01-12 18:28 ` Tom Tromey
2021-01-12 19:20 ` Simon Marchi via Gdb-patches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox