Rearranging --abort_before_entry.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user