From 76f6d11efb79da1baf55a4a451aeda2ee74f8187 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 31 Mar 2025 16:09:42 -0400 Subject: gdb: move addrmap::relocate method to addrmap_fixed The relocate method of addrmap is unnecessarily virtual. Only addrmap_fixed provides a meaningful implementation. Move the method to addrmap_fixed only and make it non-virtual. Change-Id: If61d5e70abc12c17d1e600adf0dd0707e77a6ba2 Approved-By: Tom Tromey --- gdb/addrmap.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'gdb/addrmap.c') diff --git a/gdb/addrmap.c b/gdb/addrmap.c index e6799cc..1fc95f3 100644 --- a/gdb/addrmap.c +++ b/gdb/addrmap.c @@ -317,16 +317,6 @@ addrmap_fixed::addrmap_fixed (struct obstack *obstack, gdb_assert (num_transitions == transition_count); } - -void -addrmap_mutable::relocate (CORE_ADDR offset) -{ - /* Not needed yet. */ - internal_error (_("addrmap_relocate is not implemented yet " - "for mutable addrmaps")); -} - - /* This is a splay_tree_foreach_fn. */ static int @@ -450,7 +440,7 @@ test_addrmap () CHECK_ADDRMAP_FIND (map, array, 13, 19, nullptr); /* Create corresponding fixed addrmap. */ - struct addrmap *map2 + addrmap_fixed *map2 = new (&temp_obstack) addrmap_fixed (&temp_obstack, map.get ()); SELF_CHECK (map2 != nullptr); CHECK_ADDRMAP_FIND (map2, array, 0, 9, nullptr); -- cgit v1.1