diff options
author | Jim Blandy <jimb@codesourcery.com> | 2007-12-06 23:37:35 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2007-12-06 23:37:35 +0000 |
commit | b3833a41eefdc2a0fa9b71f4e7e285338f65de0a (patch) | |
tree | 236ddd5c47cd67634c86902e4aec0d0e03743629 | |
parent | ef8dda780265fa2783ad5d6f86ffde8524711d9a (diff) | |
download | gdb-b3833a41eefdc2a0fa9b71f4e7e285338f65de0a.tar.gz |
* addrmap.c (addrmap_splay_tree_remove): New function.
(addrmap_mutable_set_empty): Use it.
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/addrmap.c | 9 |
2 files changed, 11 insertions, 1 deletions
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 <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 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); } |