diff options
| author | 2023-02-13 11:21:43 -0500 | |
|---|---|---|
| committer | 2023-02-13 19:03:12 -0500 | |
| commit | ceda2d280e8a3030c1e23083c5cea9158387fe4c (patch) | |
| tree | 8041460840ed81d4cb74d87eecfb8fb720cdfa15 /src/core/debugger/gdbstub.cpp | |
| parent | kernel: use GetCurrentProcess (diff) | |
| download | yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.gz yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.xz yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.zip | |
general: rename CurrentProcess to ApplicationProcess
Diffstat (limited to 'src/core/debugger/gdbstub.cpp')
| -rw-r--r-- | src/core/debugger/gdbstub.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/core/debugger/gdbstub.cpp b/src/core/debugger/gdbstub.cpp index 9c02b7b31..945ec528e 100644 --- a/src/core/debugger/gdbstub.cpp +++ b/src/core/debugger/gdbstub.cpp | |||
| @@ -96,7 +96,7 @@ static std::string EscapeXML(std::string_view data) { | |||
| 96 | 96 | ||
| 97 | GDBStub::GDBStub(DebuggerBackend& backend_, Core::System& system_) | 97 | GDBStub::GDBStub(DebuggerBackend& backend_, Core::System& system_) |
| 98 | : DebuggerFrontend(backend_), system{system_} { | 98 | : DebuggerFrontend(backend_), system{system_} { |
| 99 | if (system.CurrentProcess()->Is64BitProcess()) { | 99 | if (system.ApplicationProcess()->Is64BitProcess()) { |
| 100 | arch = std::make_unique<GDBStubA64>(); | 100 | arch = std::make_unique<GDBStubA64>(); |
| 101 | } else { | 101 | } else { |
| 102 | arch = std::make_unique<GDBStubA32>(); | 102 | arch = std::make_unique<GDBStubA32>(); |
| @@ -340,15 +340,15 @@ void GDBStub::HandleBreakpointInsert(std::string_view command) { | |||
| 340 | success = true; | 340 | success = true; |
| 341 | break; | 341 | break; |
| 342 | case BreakpointType::WriteWatch: | 342 | case BreakpointType::WriteWatch: |
| 343 | success = system.CurrentProcess()->InsertWatchpoint(system, addr, size, | 343 | success = system.ApplicationProcess()->InsertWatchpoint(system, addr, size, |
| 344 | Kernel::DebugWatchpointType::Write); | 344 | Kernel::DebugWatchpointType::Write); |
| 345 | break; | 345 | break; |
| 346 | case BreakpointType::ReadWatch: | 346 | case BreakpointType::ReadWatch: |
| 347 | success = system.CurrentProcess()->InsertWatchpoint(system, addr, size, | 347 | success = system.ApplicationProcess()->InsertWatchpoint(system, addr, size, |
| 348 | Kernel::DebugWatchpointType::Read); | 348 | Kernel::DebugWatchpointType::Read); |
| 349 | break; | 349 | break; |
| 350 | case BreakpointType::AccessWatch: | 350 | case BreakpointType::AccessWatch: |
| 351 | success = system.CurrentProcess()->InsertWatchpoint( | 351 | success = system.ApplicationProcess()->InsertWatchpoint( |
| 352 | system, addr, size, Kernel::DebugWatchpointType::ReadOrWrite); | 352 | system, addr, size, Kernel::DebugWatchpointType::ReadOrWrite); |
| 353 | break; | 353 | break; |
| 354 | case BreakpointType::Hardware: | 354 | case BreakpointType::Hardware: |
| @@ -391,15 +391,15 @@ void GDBStub::HandleBreakpointRemove(std::string_view command) { | |||
| 391 | break; | 391 | break; |
| 392 | } | 392 | } |
| 393 | case BreakpointType::WriteWatch: | 393 | case BreakpointType::WriteWatch: |
| 394 | success = system.CurrentProcess()->RemoveWatchpoint(system, addr, size, | 394 | success = system.ApplicationProcess()->RemoveWatchpoint(system, addr, size, |
| 395 | Kernel::DebugWatchpointType::Write); | 395 | Kernel::DebugWatchpointType::Write); |
| 396 | break; | 396 | break; |
| 397 | case BreakpointType::ReadWatch: | 397 | case BreakpointType::ReadWatch: |
| 398 | success = system.CurrentProcess()->RemoveWatchpoint(system, addr, size, | 398 | success = system.ApplicationProcess()->RemoveWatchpoint(system, addr, size, |
| 399 | Kernel::DebugWatchpointType::Read); | 399 | Kernel::DebugWatchpointType::Read); |
| 400 | break; | 400 | break; |
| 401 | case BreakpointType::AccessWatch: | 401 | case BreakpointType::AccessWatch: |
| 402 | success = system.CurrentProcess()->RemoveWatchpoint( | 402 | success = system.ApplicationProcess()->RemoveWatchpoint( |
| 403 | system, addr, size, Kernel::DebugWatchpointType::ReadOrWrite); | 403 | system, addr, size, Kernel::DebugWatchpointType::ReadOrWrite); |
| 404 | break; | 404 | break; |
| 405 | case BreakpointType::Hardware: | 405 | case BreakpointType::Hardware: |
| @@ -482,7 +482,7 @@ static std::optional<std::string> GetNameFromThreadType64(Core::Memory::Memory& | |||
| 482 | 482 | ||
| 483 | static std::optional<std::string> GetThreadName(Core::System& system, | 483 | static std::optional<std::string> GetThreadName(Core::System& system, |
| 484 | const Kernel::KThread* thread) { | 484 | const Kernel::KThread* thread) { |
| 485 | if (system.CurrentProcess()->Is64BitProcess()) { | 485 | if (system.ApplicationProcess()->Is64BitProcess()) { |
| 486 | return GetNameFromThreadType64(system.Memory(), thread); | 486 | return GetNameFromThreadType64(system.Memory(), thread); |
| 487 | } else { | 487 | } else { |
| 488 | return GetNameFromThreadType32(system.Memory(), thread); | 488 | return GetNameFromThreadType32(system.Memory(), thread); |
| @@ -555,7 +555,7 @@ void GDBStub::HandleQuery(std::string_view command) { | |||
| 555 | SendReply(fmt::format("TextSeg={:x}", main->first)); | 555 | SendReply(fmt::format("TextSeg={:x}", main->first)); |
| 556 | } else { | 556 | } else { |
| 557 | SendReply(fmt::format("TextSeg={:x}", | 557 | SendReply(fmt::format("TextSeg={:x}", |
| 558 | system.CurrentProcess()->PageTable().GetCodeRegionStart())); | 558 | system.ApplicationProcess()->PageTable().GetCodeRegionStart())); |
| 559 | } | 559 | } |
| 560 | } else if (command.starts_with("Xfer:libraries:read::")) { | 560 | } else if (command.starts_with("Xfer:libraries:read::")) { |
| 561 | Loader::AppLoader::Modules modules; | 561 | Loader::AppLoader::Modules modules; |
| @@ -729,7 +729,7 @@ void GDBStub::HandleRcmd(const std::vector<u8>& command) { | |||
| 729 | std::string_view command_str{reinterpret_cast<const char*>(&command[0]), command.size()}; | 729 | std::string_view command_str{reinterpret_cast<const char*>(&command[0]), command.size()}; |
| 730 | std::string reply; | 730 | std::string reply; |
| 731 | 731 | ||
| 732 | auto* process = system.CurrentProcess(); | 732 | auto* process = system.ApplicationProcess(); |
| 733 | auto& page_table = process->PageTable(); | 733 | auto& page_table = process->PageTable(); |
| 734 | 734 | ||
| 735 | const char* commands = "Commands:\n" | 735 | const char* commands = "Commands:\n" |