diff options
author | Tom Tromey <tom@tromey.com> | 2022-04-16 09:53:39 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-06-12 10:49:48 -0600 |
commit | d89120e9493281a60d6e7280e9cfa3741ea7e379 (patch) | |
tree | e86e76097e9013c870e47733158256f986e18b71 /gdb/addrmap.c | |
parent | 10cce2c44190c0d822c593c221f7ffa2ea20f246 (diff) | |
download | gdb-d89120e9493281a60d6e7280e9cfa3741ea7e379.zip gdb-d89120e9493281a60d6e7280e9cfa3741ea7e379.tar.gz gdb-d89120e9493281a60d6e7280e9cfa3741ea7e379.tar.bz2 |
Remove addrmap::create_fixed
addrmap::create_fixed is just a simple wrapper for 'new', so remove it
in favor of uses of 'new'.
Diffstat (limited to 'gdb/addrmap.c')
-rw-r--r-- | gdb/addrmap.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/gdb/addrmap.c b/gdb/addrmap.c index 29e6b2e..51a6c67 100644 --- a/gdb/addrmap.c +++ b/gdb/addrmap.c @@ -72,15 +72,6 @@ addrmap_fixed::find (CORE_ADDR addr) const } -struct addrmap * -addrmap_fixed::create_fixed (struct obstack *obstack) -{ - internal_error (__FILE__, __LINE__, - _("addrmap_create_fixed is not implemented yet " - "for fixed addrmaps")); -} - - void addrmap_fixed::relocate (CORE_ADDR offset) { @@ -306,13 +297,6 @@ addrmap_fixed::addrmap_fixed (struct obstack *obstack, addrmap_mutable *mut) } -struct addrmap * -addrmap_mutable::create_fixed (struct obstack *obstack) -{ - return new (obstack) struct addrmap_fixed (obstack, this); -} - - void addrmap_mutable::relocate (CORE_ADDR offset) { @@ -491,7 +475,8 @@ test_addrmap () CHECK_ADDRMAP_FIND (map, array, 13, 19, nullptr); /* Create corresponding fixed addrmap. */ - struct addrmap *map2 = map->create_fixed (&temp_obstack); + struct addrmap *map2 + = new (&temp_obstack) addrmap_fixed (&temp_obstack, map); SELF_CHECK (map2 != nullptr); CHECK_ADDRMAP_FIND (map2, array, 0, 9, nullptr); CHECK_ADDRMAP_FIND (map2, array, 10, 12, val1); |