That's an internal variable of breakpoint.c. Insted, use
iterate_over_breakpoints to update the breakpoint list.
gdb/ChangeLog:
2019-10-15 Christian Biesinger <cbiesinger@google.com>
* breakpoint.c (breakpoint_chain): Make static.
* tui/tui-winsource.c: Call iterate_over_breakpoints instead
of accessing breakpoint_chain.
Change-Id: Ic259b2c3a4c1f5a47f34cfd7fccbdcf274417429
+2019-10-15 Christian Biesinger <cbiesinger@google.com>
+
+ * breakpoint.c (breakpoint_chain): Make static.
+ * tui/tui-winsource.c: Call iterate_over_breakpoints instead
+ of accessing breakpoint_chain.
+
2019-10-15 Christian Biesinger <cbiesinger@google.com>
* breakpoint.c (iterate_over_breakpoints): Change function pointer
/* Chains of all breakpoints defined. */
-struct breakpoint *breakpoint_chain;
+static struct breakpoint *breakpoint_chain;
/* Array is sorted by bp_locations_compare - primarily by the ADDRESS. */
for (i = 0; i < content.size (); i++)
{
- struct breakpoint *bp;
- extern struct breakpoint *breakpoint_chain;
struct tui_source_element *line;
line = &content[i];
do with it. Identify enable/disabled breakpoints as well as
those that we already hit. */
tui_bp_flags mode = 0;
- for (bp = breakpoint_chain;
- bp != NULL;
- bp = bp->next)
+ iterate_over_breakpoints ([&] (breakpoint *bp) -> bool
{
struct bp_location *loc;
|| line->line_or_addr.loa == LOA_ADDRESS);
if (bp == being_deleted)
- continue;
+ return false;
for (loc = bp->loc; loc != NULL; loc = loc->next)
{
mode |= TUI_BP_HARDWARE;
}
}
- }
+ return false;
+ });
if (line->break_mode != mode)
{
line->break_mode = mode;