From 03f2d26afd506dde56ef770ae58030f9bad45e69 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Fri, 19 Jun 2015 21:53:49 -0700 Subject: [PATCH] Fixing tests with no debugger attached. --- src/xenia/cpu/frontend/ppc_translator.cc | 2 +- src/xenia/kernel/xboxkrnl_module.cc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xenia/cpu/frontend/ppc_translator.cc b/src/xenia/cpu/frontend/ppc_translator.cc index d110e9840..10abfa572 100644 --- a/src/xenia/cpu/frontend/ppc_translator.cc +++ b/src/xenia/cpu/frontend/ppc_translator.cc @@ -109,7 +109,7 @@ bool PPCTranslator::Translate(FunctionInfo* symbol_info, xe::make_reset_scope(&string_buffer_); // NOTE: we only want to do this when required, as it's expensive to build. - if (FLAGS_preserve_hir_disasm && + if (FLAGS_preserve_hir_disasm && frontend_->processor()->debugger() && frontend_->processor()->debugger()->is_attached()) { debug_info_flags |= DebugInfoFlags::kDebugInfoDisasmRawHir | DebugInfoFlags::kDebugInfoDisasmHir; diff --git a/src/xenia/kernel/xboxkrnl_module.cc b/src/xenia/kernel/xboxkrnl_module.cc index c0854c4ca..047f3da32 100644 --- a/src/xenia/kernel/xboxkrnl_module.cc +++ b/src/xenia/kernel/xboxkrnl_module.cc @@ -198,7 +198,9 @@ int XboxkrnlModule::LaunchModule(const char* path) { kernel_state_->SetExecutableModule(module); // Waits for a debugger client, if desired. - emulator()->debugger()->PreLaunch(); + if (emulator()->debugger()) { + emulator()->debugger()->PreLaunch(); + } // Launch the module. // NOTE: this won't return until the module exits.