summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-06-10 15:11:02 +0200
committerLiam <byteslice@airmail.cc>2022-06-10 15:11:02 +0200
commitde6c0defb358b6d12831a594b1b4c615003566b8 (patch)
tree6a542e52a03d2d0ba48487d90e9565ea9f225064
parentMerge pull request #8428 from bunnei/nvflinger-fix-timing (diff)
downloadyuzu-de6c0defb358b6d12831a594b1b4c615003566b8.tar
yuzu-de6c0defb358b6d12831a594b1b4c615003566b8.tar.gz
yuzu-de6c0defb358b6d12831a594b1b4c615003566b8.tar.bz2
yuzu-de6c0defb358b6d12831a594b1b4c615003566b8.tar.lz
yuzu-de6c0defb358b6d12831a594b1b4c615003566b8.tar.xz
yuzu-de6c0defb358b6d12831a594b1b4c615003566b8.tar.zst
yuzu-de6c0defb358b6d12831a594b1b4c615003566b8.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu_cmd/config.cpp2
-rw-r--r--src/yuzu_cmd/default_ini.h5
-rw-r--r--src/yuzu_cmd/yuzu.cpp8
3 files changed, 15 insertions, 0 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index fc16f0f0c..fc4744fb0 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -344,6 +344,8 @@ void Config::ReadValues() {
ReadSetting("Debugging", Settings::values.use_debug_asserts);
ReadSetting("Debugging", Settings::values.use_auto_stub);
ReadSetting("Debugging", Settings::values.disable_macro_jit);
+ ReadSetting("Debugging", Settings::values.use_gdbstub);
+ ReadSetting("Debugging", Settings::values.gdbstub_port);
const auto title_list = sdl2_config->Get("AddOns", "title_ids", "");
std::stringstream ss(title_list);
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h
index f34d6b728..d5281863f 100644
--- a/src/yuzu_cmd/default_ini.h
+++ b/src/yuzu_cmd/default_ini.h
@@ -437,6 +437,11 @@ disable_macro_jit=false
# Presents guest frames as they become available. Experimental.
# false: Disabled (default), true: Enabled
disable_fps_limit=false
+# Determines whether to enable the GDB stub and wait for the debugger to attach before running.
+# false: Disabled (default), true: Enabled
+use_gdbstub=false
+# The port to use for the GDB server, if it is enabled.
+gdbstub_port=6543
[WebService]
# Whether or not to enable telemetry
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index ab12dd15d..a0d619c48 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -217,7 +217,15 @@ int main(int argc, char** argv) {
[](VideoCore::LoadCallbackStage, size_t value, size_t total) {});
}
+ system.RegisterExitCallback([&] {
+ // Just exit right away.
+ exit(0);
+ });
+
void(system.Run());
+ if (system.DebuggerEnabled()) {
+ system.InitializeDebugger();
+ }
while (emu_window->IsOpen()) {
emu_window->WaitEvent();
}