This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Move declaration of breakpoint_chain to the header.
- From: "Christian Biesinger via gdb-patches" <gdb-patches at sourceware dot org>
- To: gdb-patches at sourceware dot org
- Cc: Christian Biesinger <cbiesinger at google dot com>
- Date: Mon, 7 Oct 2019 13:46:45 -0500
- Subject: [PATCH] Move declaration of breakpoint_chain to the header.
- Reply-to: Christian Biesinger <cbiesinger at google dot com>
TUI was using it.
gdb/ChangeLog:
2019-10-07 Christian Biesinger <cbiesinger@google.com>
* breakpoint.c (breakpoint_chain): Move comment to header.
* breakpoint.h (breakpoint_chain): Declare.
* tui/tui-winsource.c (tui_source_window_base::update_breakpoint_info):
Remove declaration of breakpoint_chain.
---
gdb/breakpoint.c | 2 +-
gdb/breakpoint.h | 4 ++++
gdb/tui/tui-winsource.c | 1 -
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 0a70516338..fb2ef78c06 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -519,7 +519,7 @@ bool target_exact_watchpoints = false;
for (B = breakpoint_chain; B; B = B->next) \
if (is_tracepoint (B))
-/* Chains of all breakpoints defined. */
+/* See breakpoint.h. */
struct breakpoint *breakpoint_chain;
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 9791032c5e..4cd3c2547d 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -849,6 +849,10 @@ struct watchpoint : public breakpoint
CORE_ADDR hw_wp_mask;
};
+/* Chains of all breakpoints defined. */
+
+extern struct breakpoint *breakpoint_chain;
+
/* Given a function FUNC (struct breakpoint *B, void *DATA) and
USER_DATA, call FUNC for every known breakpoint passing USER_DATA
as argument.
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index 683856de81..78c314c0a7 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -402,7 +402,6 @@ tui_source_window_base::update_breakpoint_info
for (i = 0; i < content.size (); i++)
{
struct breakpoint *bp;
- extern struct breakpoint *breakpoint_chain;
struct tui_source_element *line;
line = &content[i];
--
2.23.0.581.g78d2f28ef7-goog