X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=gdb%2Faddrmap.h;h=8c5fb0a830443a2c385e78a3cd4d6eb9b7843d62;hb=e3169fe0bb9b9190f0c7849864f0bb68cb8c2d5b;hp=1abdf0dc77e2b880aaf6f0a19447e1c0ea961d4b;hpb=0fb0cc7590113e9b459dfcc48dc71c9d419d9580;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/addrmap.h b/gdb/addrmap.h index 1abdf0dc77..8c5fb0a830 100644 --- a/gdb/addrmap.h +++ b/gdb/addrmap.h @@ -1,6 +1,6 @@ /* addrmap.h --- interface to address map data structure. - Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2007-2019 Free Software Foundation, Inc. This file is part of GDB. @@ -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 */