summaryrefslogtreecommitdiff
path: root/gdb/inferior.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-04-23 06:26:31 -0600
committerTom Tromey <tromey@adacore.com>2020-04-23 06:26:31 -0600
commit740480b88afd4f2b01d117525f534ddce28530f3 (patch)
tree0c1b273c1f4d927ef0c469829855926cc5438ffb /gdb/inferior.h
parent2745674244d6aecddcf636475034bdb9c0a6b4a0 (diff)
downloadbinutils-gdb-740480b88afd4f2b01d117525f534ddce28530f3.tar.gz
Remove iterate_over_inferiors
The last caller of iterate_over_inferiors is darwin-nat.c. This patch removes the calls from this file, and then remove iterate_over_inferiors. In general I think "external iteration" is to be preferred in gdb, the main benefit being that the code is easier to read. I rebuilt this on Darwin. I seem to only have access to Darwin systems where gdb does not yet work :-(, so I can't run the test suite. gdb/ChangeLog 2020-04-23 Tom Tromey <tom@tromey.com> * inferior.h (iterate_over_inferiors): Don't declare. * inferior.c (iterate_over_inferiors): Remove. * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it): Remove. (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't use iterate_over_inferiors. (darwin_resume_inferior_it) (struct resume_inferior_threads_param) (darwin_resume_inferior_threads_it): Remove. (darwin_nat_target::resume): Don't use iterate_over_inferiors. Change-Id: Ib2fdf2c98e40f13156ff869ed3173d5f1fdae7ea
Diffstat (limited to 'gdb/inferior.h')
-rw-r--r--gdb/inferior.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 4229c6017d9..1ac51369dff 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -589,20 +589,6 @@ extern struct inferior *find_inferior_id (int num);
extern struct inferior *
find_inferior_for_program_space (struct program_space *pspace);
-/* Inferior iterator function.
-
- Calls a callback function once for each inferior, so long as the
- callback function returns false. If the callback function returns
- true, the iteration will end and the current inferior will be
- returned. This can be useful for implementing a search for a
- inferior with arbitrary attributes, or for applying some operation
- to every inferior.
-
- It is safe to delete the iterated inferior from the callback. */
-extern struct inferior *iterate_over_inferiors (int (*) (struct inferior *,
- void *),
- void *);
-
/* Returns true if the inferior list is not empty. */
extern int have_inferiors (void);