From cb446409e69a10b9a471bbcdf73a1108c7ff93f1 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 6 Dec 2007 23:37:35 +0000 Subject: [PATCH] * addrmap.c (addrmap_splay_tree_remove): New function. (addrmap_mutable_set_empty): Use it. --- gdb/ChangeLog | 3 +++ gdb/addrmap.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3128264d8b0..b4b455c3de8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2007-12-06 Jim Blandy + * 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 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); } -- 2.30.2