aboutsummaryrefslogtreecommitdiff
path: root/gdb/addrmap.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-08-06 12:30:51 -0600
committerTom Tromey <tromey@adacore.com>2021-08-06 12:32:38 -0600
commitfd986183343387b019080d81838ad9371593b219 (patch)
tree2b08d97ec340a36950656efb3c239faf5bad32fa /gdb/addrmap.c
parentb9f3fbc9f3453bcb24fece0c46acf581d13d3f64 (diff)
downloadgdb-fd986183343387b019080d81838ad9371593b219.zip
gdb-fd986183343387b019080d81838ad9371593b219.tar.gz
gdb-fd986183343387b019080d81838ad9371593b219.tar.bz2
Unconditionally define _initialize_addrmap
The way that init.c is generated does not allow for an initialization function to be conditionally defined -- doing so will result in a link error. This patch fixes a build problem that arises from such a conditional definition. It can be reproduce with --disable-unit-tests.
Diffstat (limited to 'gdb/addrmap.c')
-rw-r--r--gdb/addrmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/addrmap.c b/gdb/addrmap.c
index 2281782..49e51a3 100644
--- a/gdb/addrmap.c
+++ b/gdb/addrmap.c
@@ -681,11 +681,13 @@ test_addrmap ()
}
} // namespace selftests
+#endif /* GDB_SELF_TEST */
void _initialize_addrmap ();
void
_initialize_addrmap ()
{
+#if GDB_SELF_TEST
selftests::register_test ("addrmap", selftests::test_addrmap);
-}
#endif /* GDB_SELF_TEST */
+}