summaryrefslogtreecommitdiff
path: root/gdb/addrmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/addrmap.h')
-rw-r--r--gdb/addrmap.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/addrmap.h b/gdb/addrmap.h
index 96d4e08a807..7ec5447ce5e 100644
--- a/gdb/addrmap.h
+++ b/gdb/addrmap.h
@@ -91,4 +91,15 @@ struct addrmap *addrmap_create_fixed (struct addrmap *original,
to either mutable or immutable maps.) */
void addrmap_relocate (struct addrmap *map, CORE_ADDR offset);
+/* The type of a function used to iterate over the map.
+ OBJ is NULL for unmapped regions. */
+typedef int (*addrmap_foreach_fn) (void *data, CORE_ADDR start_addr,
+ void *obj);
+
+/* Call FN, passing it DATA, for every address in MAP, following an
+ in-order traversal. If FN ever returns a non-zero value, the
+ iteration ceases immediately, and the value is returned.
+ Otherwise, this function returns 0. */
+int addrmap_foreach (struct addrmap *map, addrmap_foreach_fn fn, void *data);
+
#endif /* ADDRMAP_H */