diff options
| author | 2022-06-10 09:11:02 -0400 | |
|---|---|---|
| committer | 2022-06-10 09:11:02 -0400 | |
| commit | de6c0defb358b6d12831a594b1b4c615003566b8 (patch) | |
| tree | 6a542e52a03d2d0ba48487d90e9565ea9f225064 | |
| parent | Merge pull request #8428 from bunnei/nvflinger-fix-timing (diff) | |
| download | yuzu-de6c0defb358b6d12831a594b1b4c615003566b8.tar.gz yuzu-de6c0defb358b6d12831a594b1b4c615003566b8.tar.xz yuzu-de6c0defb358b6d12831a594b1b4c615003566b8.zip | |
core/debugger: support operation in yuzu-cmd
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 5 | ||||
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 8 |
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() { | |||
| 344 | ReadSetting("Debugging", Settings::values.use_debug_asserts); | 344 | ReadSetting("Debugging", Settings::values.use_debug_asserts); |
| 345 | ReadSetting("Debugging", Settings::values.use_auto_stub); | 345 | ReadSetting("Debugging", Settings::values.use_auto_stub); |
| 346 | ReadSetting("Debugging", Settings::values.disable_macro_jit); | 346 | ReadSetting("Debugging", Settings::values.disable_macro_jit); |
| 347 | ReadSetting("Debugging", Settings::values.use_gdbstub); | ||
| 348 | ReadSetting("Debugging", Settings::values.gdbstub_port); | ||
| 347 | 349 | ||
| 348 | const auto title_list = sdl2_config->Get("AddOns", "title_ids", ""); | 350 | const auto title_list = sdl2_config->Get("AddOns", "title_ids", ""); |
| 349 | std::stringstream ss(title_list); | 351 | 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 | |||
| 437 | # Presents guest frames as they become available. Experimental. | 437 | # Presents guest frames as they become available. Experimental. |
| 438 | # false: Disabled (default), true: Enabled | 438 | # false: Disabled (default), true: Enabled |
| 439 | disable_fps_limit=false | 439 | disable_fps_limit=false |
| 440 | # Determines whether to enable the GDB stub and wait for the debugger to attach before running. | ||
| 441 | # false: Disabled (default), true: Enabled | ||
| 442 | use_gdbstub=false | ||
| 443 | # The port to use for the GDB server, if it is enabled. | ||
| 444 | gdbstub_port=6543 | ||
| 440 | 445 | ||
| 441 | [WebService] | 446 | [WebService] |
| 442 | # Whether or not to enable telemetry | 447 | # 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) { | |||
| 217 | [](VideoCore::LoadCallbackStage, size_t value, size_t total) {}); | 217 | [](VideoCore::LoadCallbackStage, size_t value, size_t total) {}); |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | system.RegisterExitCallback([&] { | ||
| 221 | // Just exit right away. | ||
| 222 | exit(0); | ||
| 223 | }); | ||
| 224 | |||
| 220 | void(system.Run()); | 225 | void(system.Run()); |
| 226 | if (system.DebuggerEnabled()) { | ||
| 227 | system.InitializeDebugger(); | ||
| 228 | } | ||
| 221 | while (emu_window->IsOpen()) { | 229 | while (emu_window->IsOpen()) { |
| 222 | emu_window->WaitEvent(); | 230 | emu_window->WaitEvent(); |
| 223 | } | 231 | } |