From 9fe3819e83a442f1bd563000120121e5518f7d53 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 30 Aug 2021 16:10:41 -0400 Subject: gdb: remove breakpoint_find_if Remove breakpoint_find_if, replace its sole usage with using all_breakpoints directly instead. At the same time, change return types to use bool. Change-Id: I9ec392236b4804b362d16ab563330b9c07311106 --- gdb/breakpoint.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'gdb/breakpoint.c') diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index feca224..f6c9683 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -627,19 +627,6 @@ static struct cmd_list_element *breakpoint_set_cmdlist; static struct cmd_list_element *breakpoint_show_cmdlist; struct cmd_list_element *save_cmdlist; -/* See declaration at breakpoint.h. */ - -struct breakpoint * -breakpoint_find_if (int (*func) (struct breakpoint *b, void *d), - void *user_data) -{ - for (breakpoint *b : all_breakpoints ()) - if (func (b, user_data) != 0) - return b; - - return nullptr; -} - /* Return whether a breakpoint is an active enabled breakpoint. */ static int breakpoint_enabled (struct breakpoint *b) -- cgit v1.1