OSDN Git Service

* addrmap.c (addrmap_splay_tree_remove): New function.
authorjimb <jimb>
Thu, 6 Dec 2007 23:37:34 +0000 (23:37 +0000)
committerjimb <jimb>
Thu, 6 Dec 2007 23:37:34 +0000 (23:37 +0000)
(addrmap_mutable_set_empty): Use it.

gdb/ChangeLog
gdb/addrmap.c

index 3128264..b4b455c 100644 (file)
@@ -1,5 +1,8 @@
 2007-12-06  Jim Blandy  <jimb@codesourcery.com>
 
+       * addrmap.c (addrmap_splay_tree_remove): New function.
+       (addrmap_mutable_set_empty): Use it.
+
        * addrmap.c, addrmap.h: Update to GPLv3.
 
        * addrmap.c (struct addrmap): Make the referenced function table
index b2c0bce..223659f 100644 (file)
@@ -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);
     }