void (*set_empty) (struct addrmap *self,
CORE_ADDR start, CORE_ADDR end_inclusive,
void *obj);
- void *(*find) (struct addrmap *self, CORE_ADDR addr);
+ void *(*find) (const addrmap *self, CORE_ADDR addr);
struct addrmap *(*create_fixed) (struct addrmap *self,
struct obstack *obstack);
void (*relocate) (struct addrmap *self, CORE_ADDR offset);
void *
-addrmap_find (struct addrmap *map, CORE_ADDR addr)
+addrmap_find (const addrmap *map, CORE_ADDR addr)
{
return map->funcs->find (map, addr);
}
static void *
-addrmap_fixed_find (struct addrmap *self, CORE_ADDR addr)
+addrmap_fixed_find (const addrmap *self, CORE_ADDR addr)
{
- struct addrmap_fixed *map = (struct addrmap_fixed *) self;
- struct addrmap_transition *bottom = &map->transitions[0];
- struct addrmap_transition *top = &map->transitions[map->num_transitions - 1];
+ const addrmap_fixed *map = (const addrmap_fixed *) self;
+ const addrmap_transition *bottom = &map->transitions[0];
+ const addrmap_transition *top = &map->transitions[map->num_transitions - 1];
while (bottom < top)
{
1 (i.e., two entries are under consideration), then mid ==
bottom, and then we may not narrow the range when (mid->addr
< addr). */
- struct addrmap_transition *mid = top - (top - bottom) / 2;
+ const addrmap_transition *mid = top - (top - bottom) / 2;
if (mid->addr == addr)
{
static void *
-addrmap_mutable_find (struct addrmap *self, CORE_ADDR addr)
+addrmap_mutable_find (const addrmap *self, CORE_ADDR addr)
{
struct addrmap_mutable *map = (struct addrmap_mutable *) self;
splay_tree_node n = addrmap_splay_tree_lookup (map, addr);
void *obj);
/* Return the object associated with ADDR in MAP. */
-void *addrmap_find (struct addrmap *map, CORE_ADDR addr);
+void *addrmap_find (const addrmap *map, CORE_ADDR addr);
/* Create a fixed address map which is a copy of the mutable address
map ORIGINAL. Allocate entries in OBSTACK. */