mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 09:12:46 +01:00
Default to settings from ini for gdbstub
This commit is contained in:
parent
44d746fc92
commit
64ec5ac356
1 changed files with 6 additions and 6 deletions
|
@ -43,8 +43,10 @@ static void PrintHelp()
|
||||||
|
|
||||||
/// Application entry point
|
/// Application entry point
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
Config config;
|
||||||
int option_index = 0;
|
int option_index = 0;
|
||||||
u32 gdb_port = 0;
|
bool use_gdbstub = Settings::values.use_gdbstub;
|
||||||
|
u32 gdb_port = static_cast<u32>(Settings::values.gdbstub_port);
|
||||||
char *endarg;
|
char *endarg;
|
||||||
std::string boot_filename;
|
std::string boot_filename;
|
||||||
|
|
||||||
|
@ -64,6 +66,7 @@ int main(int argc, char **argv) {
|
||||||
case 'g':
|
case 'g':
|
||||||
errno = 0;
|
errno = 0;
|
||||||
gdb_port = strtoul(optarg, &endarg, 0);
|
gdb_port = strtoul(optarg, &endarg, 0);
|
||||||
|
use_gdbstub = true;
|
||||||
if (endarg == optarg) errno = EINVAL;
|
if (endarg == optarg) errno = EINVAL;
|
||||||
if (errno != 0) {
|
if (errno != 0) {
|
||||||
perror("--gdbport");
|
perror("--gdbport");
|
||||||
|
@ -88,13 +91,10 @@ int main(int argc, char **argv) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Config config;
|
|
||||||
log_filter.ParseFilterString(Settings::values.log_filter);
|
log_filter.ParseFilterString(Settings::values.log_filter);
|
||||||
|
|
||||||
if (gdb_port != 0) {
|
GDBStub::ToggleServer(use_gdbstub);
|
||||||
GDBStub::ToggleServer(true);
|
GDBStub::SetServerPort(gdb_port);
|
||||||
GDBStub::SetServerPort(gdb_port);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::unique_ptr<EmuWindow_SDL2> emu_window = std::make_unique<EmuWindow_SDL2>();
|
std::unique_ptr<EmuWindow_SDL2> emu_window = std::make_unique<EmuWindow_SDL2>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue