Rearranging --abort_before_entry.

This commit is contained in:
Ben Vanik
2013-02-03 00:34:45 -08:00
parent 4f9e6b0547
commit 63f0785ecf
3 changed files with 13 additions and 9 deletions

View File

@@ -9,6 +9,8 @@
#include "kernel/modules/xboxkrnl/module.h"
#include <gflags/gflags.h>
#include "kernel/modules/xboxkrnl/kernel_state.h"
#include "kernel/modules/xboxkrnl/objects/xmodule.h"
@@ -26,6 +28,10 @@ using namespace xe::kernel;
using namespace xe::kernel::xboxkrnl;
DEFINE_bool(abort_before_entry, false,
"Abort execution right before launching the module.");
namespace {
}
@@ -117,6 +123,12 @@ int XboxkrnlModule::LaunchModule(const char* path) {
return 1;
}
if (FLAGS_abort_before_entry) {
XELOGI(XT("--abort_before_entry causing an early exit"));
module->Release();
return 0;
}
// Launch the module.
// NOTE: this won't return until the module exits.
result_code = module->Launch(0);