aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2020-09-12 12:30:56 -0700
committerJoel Brobecker <brobecker@adacore.com>2020-09-12 12:38:35 -0700
commit8087c3fa8b5d695e3e29e69d70d0b35ec902ac59 (patch)
tree99a434d77dfef3cb3f881e41ec35b974c869a68f /gdb/infrun.c
parent496afd17055aeb7d8f45e01715c475664f2b73bd (diff)
downloadgdb-8087c3fa8b5d695e3e29e69d70d0b35ec902ac59.zip
gdb-8087c3fa8b5d695e3e29e69d70d0b35ec902ac59.tar.gz
gdb-8087c3fa8b5d695e3e29e69d70d0b35ec902ac59.tar.bz2
Fix GDB build in infrun.c when configured with unit tests disabledgdb-10-branchpoint
I noticed this while testing the GDB in the context of the upcoming GDB 10 release branching, because part of the process involves setting development to False, which in turn changes the default for including unittest to false as well. As a result, without this patch, we get compilation errors in infrun.c such as: infrun.c:9219:5: error: `scoped_mock_context' was not declared in this scope This patch fixes it by bracketing the unitttest in namespace selftest with an #if GDB_SELF_TEST. gdb/ChangeLog: * infrun.c (namespace selftests): Only define #if GDB_SELF_TEST. Tested on x86_64-linux, with and without self-tests.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 82ec300..5773fd0 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -9200,6 +9200,7 @@ infrun_async_inferior_event_handler (gdb_client_data data)
inferior_event_handler (INF_REG_EVENT);
}
+#if GDB_SELF_TEST
namespace selftests
{
@@ -9264,6 +9265,8 @@ infrun_thread_ptid_changed ()
} /* namespace selftests */
+#endif /* GDB_SELF_TEST */
+
void _initialize_infrun ();
void
_initialize_infrun ()