]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* addrmap.c (addrmap_splay_tree_remove): New function.
authorJim Blandy <jimb@codesourcery.com>
Thu, 6 Dec 2007 23:37:35 +0000 (23:37 +0000)
committerJim Blandy <jimb@codesourcery.com>
Thu, 6 Dec 2007 23:37:35 +0000 (23:37 +0000)
(addrmap_mutable_set_empty): Use it.

gdb/ChangeLog
gdb/addrmap.c

index 3128264d8b002dc04c5004e89f2960456ccfca2a..b4b455c3de8d9cfe076b9a37cc586a80af59295f 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 b2c0bcec902968bdb9dfede180fb376dda02812c..223659fbce340052de9a854196847dc96f3be299 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);
     }