mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
boot: implement --unhandled-exception=stalldebug (#1690)
Using this option will stall the crashed thread until the debugger attaches, so that the newly attached debugger can be handed over the exception, enabling breaking at correct stack location. `--no-exception-handlers` injector option controlled whether Dalamud Crash Handler would intercept exceptions before. Those are now either `default` or `none` option for `--unhandled-exception`.
This commit is contained in:
parent
b85914c54c
commit
8ff4662f1f
8 changed files with 101 additions and 13 deletions
|
|
@ -82,6 +82,21 @@ void from_json(const nlohmann::json& json, DalamudStartInfo::LoadMethod& value)
|
|||
}
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& json, DalamudStartInfo::UnhandledExceptionHandlingMode& value) {
|
||||
if (json.is_number_integer()) {
|
||||
value = static_cast<DalamudStartInfo::UnhandledExceptionHandlingMode>(json.get<int>());
|
||||
|
||||
} else if (json.is_string()) {
|
||||
const auto langstr = unicode::convert<std::string>(json.get<std::string>(), &unicode::lower);
|
||||
if (langstr == "default")
|
||||
value = DalamudStartInfo::UnhandledExceptionHandlingMode::Default;
|
||||
else if (langstr == "stalldebug")
|
||||
value = DalamudStartInfo::UnhandledExceptionHandlingMode::StallDebug;
|
||||
else if (langstr == "none")
|
||||
value = DalamudStartInfo::UnhandledExceptionHandlingMode::None;
|
||||
}
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& json, DalamudStartInfo& config) {
|
||||
if (!json.is_object())
|
||||
return;
|
||||
|
|
@ -121,7 +136,7 @@ void from_json(const nlohmann::json& json, DalamudStartInfo& config) {
|
|||
}
|
||||
|
||||
config.CrashHandlerShow = json.value("CrashHandlerShow", config.CrashHandlerShow);
|
||||
config.NoExceptionHandlers = json.value("NoExceptionHandlers", config.NoExceptionHandlers);
|
||||
config.UnhandledException = json.value("UnhandledException", config.UnhandledException);
|
||||
}
|
||||
|
||||
void DalamudStartInfo::from_envvars() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue