]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix GDB build in infrun.c when configured with unit tests disabled gdb-10-branchpoint
authorJoel Brobecker <brobecker@adacore.com>
Sat, 12 Sep 2020 19:30:56 +0000 (12:30 -0700)
committerJoel Brobecker <brobecker@adacore.com>
Sat, 12 Sep 2020 19:38:35 +0000 (12:38 -0700)
commit8087c3fa8b5d695e3e29e69d70d0b35ec902ac59
tree99a434d77dfef3cb3f881e41ec35b974c869a68f
parent496afd17055aeb7d8f45e01715c475664f2b73bd
Fix GDB build in infrun.c when configured with unit tests disabled

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.
gdb/ChangeLog
gdb/infrun.c