https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f26754e6dd25738522d5e1fe468e74cc398b9f47
commit f26754e6dd25738522d5e1fe468e74cc398b9f47 Author: Jérôme Gardou <jerome.gar...@reactos.org> AuthorDate: Wed Oct 21 12:32:54 2020 +0200 Commit: Jérôme Gardou <jerome.gar...@reactos.org> CommitDate: Wed Oct 21 13:11:20 2020 +0200 [NTOSKRNL] Completely disable optimizations when using GDB --- ntoskrnl/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ntoskrnl/CMakeLists.txt b/ntoskrnl/CMakeLists.txt index 57a387ffa23..e1823f70019 100644 --- a/ntoskrnl/CMakeLists.txt +++ b/ntoskrnl/CMakeLists.txt @@ -39,6 +39,8 @@ if(MSVC) add_target_link_flags(ntoskrnl "/SECTION:INIT,D") else() if(GDB) + # Completely disable optimizations when debugging the kernel + target_compile_options(ntoskrnl PRIVATE -O0) set_image_base(ntoskrnl 0x00800000) else() set_image_base(ntoskrnl 0x80800000)