summaryrefslogtreecommitdiff
path: root/gdb/addrmap.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2007-12-06 23:37:35 +0000
committerJim Blandy <jimb@codesourcery.com>2007-12-06 23:37:35 +0000
commitb3833a41eefdc2a0fa9b71f4e7e285338f65de0a (patch)
tree236ddd5c47cd67634c86902e4aec0d0e03743629 /gdb/addrmap.c
parentef8dda780265fa2783ad5d6f86ffde8524711d9a (diff)
downloadgdb-b3833a41eefdc2a0fa9b71f4e7e285338f65de0a.tar.gz
* addrmap.c (addrmap_splay_tree_remove): New function.
(addrmap_mutable_set_empty): Use it.
Diffstat (limited to 'gdb/addrmap.c')
-rw-r--r--gdb/addrmap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/addrmap.c b/gdb/addrmap.c
index b2c0bcec902..223659fbce3 100644
--- a/gdb/addrmap.c
+++ b/gdb/addrmap.c
@@ -252,6 +252,13 @@ addrmap_splay_tree_successor (struct addrmap_mutable *map, CORE_ADDR addr)
}
+static void
+addrmap_splay_tree_remove (struct addrmap_mutable *map, CORE_ADDR addr)
+{
+ splay_tree_remove (map->tree, (splay_tree_key) &addr);
+}
+
+
static CORE_ADDR
addrmap_node_key (splay_tree_node node)
{
@@ -347,7 +354,7 @@ addrmap_mutable_set_empty (struct addrmap *this,
{
next = addrmap_splay_tree_successor (map, addrmap_node_key (n));
if (addrmap_node_value (n) == prior_value)
- splay_tree_remove (map->tree, addrmap_node_key (n));
+ addrmap_splay_tree_remove (map, addrmap_node_key (n));
else
prior_value = addrmap_node_value (n);
}