diff options
| author | 2023-03-23 10:00:19 -0400 | |
|---|---|---|
| committer | 2023-03-23 10:00:19 -0400 | |
| commit | c41a4baf06efe935f08331bc6f8ff6d80dc088f5 (patch) | |
| tree | a6580d41bd440b240b2f60db38fdeec60fca2eff /src/core/debugger/gdbstub.cpp | |
| parent | Merge pull request #9962 from Kelebek1/disable_srgb (diff) | |
| parent | kernel: use KTypedAddress for addresses (diff) | |
| download | yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar.gz yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar.xz yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.zip | |
Merge pull request #9964 from liamwhite/typed-address
kernel: use KTypedAddress for addresses
Diffstat (limited to 'src/core/debugger/gdbstub.cpp')
| -rw-r--r-- | src/core/debugger/gdbstub.cpp | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/core/debugger/gdbstub.cpp b/src/core/debugger/gdbstub.cpp index b2fe6bd7d..5cfb66b93 100644 --- a/src/core/debugger/gdbstub.cpp +++ b/src/core/debugger/gdbstub.cpp | |||
| @@ -118,14 +118,14 @@ void GDBStub::Watchpoint(Kernel::KThread* thread, const Kernel::DebugWatchpoint& | |||
| 118 | 118 | ||
| 119 | switch (watch.type) { | 119 | switch (watch.type) { |
| 120 | case Kernel::DebugWatchpointType::Read: | 120 | case Kernel::DebugWatchpointType::Read: |
| 121 | SendReply(fmt::format("{}rwatch:{:x};", status, watch.start_address)); | 121 | SendReply(fmt::format("{}rwatch:{:x};", status, GetInteger(watch.start_address))); |
| 122 | break; | 122 | break; |
| 123 | case Kernel::DebugWatchpointType::Write: | 123 | case Kernel::DebugWatchpointType::Write: |
| 124 | SendReply(fmt::format("{}watch:{:x};", status, watch.start_address)); | 124 | SendReply(fmt::format("{}watch:{:x};", status, GetInteger(watch.start_address))); |
| 125 | break; | 125 | break; |
| 126 | case Kernel::DebugWatchpointType::ReadOrWrite: | 126 | case Kernel::DebugWatchpointType::ReadOrWrite: |
| 127 | default: | 127 | default: |
| 128 | SendReply(fmt::format("{}awatch:{:x};", status, watch.start_address)); | 128 | SendReply(fmt::format("{}awatch:{:x};", status, GetInteger(watch.start_address))); |
| 129 | break; | 129 | break; |
| 130 | } | 130 | } |
| 131 | } | 131 | } |
| @@ -554,8 +554,9 @@ void GDBStub::HandleQuery(std::string_view command) { | |||
| 554 | if (main != modules.end()) { | 554 | if (main != modules.end()) { |
| 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( |
| 558 | system.ApplicationProcess()->PageTable().GetCodeRegionStart())); | 558 | "TextSeg={:x}", |
| 559 | GetInteger(system.ApplicationProcess()->PageTable().GetCodeRegionStart()))); | ||
| 559 | } | 560 | } |
| 560 | } else if (command.starts_with("Xfer:libraries:read::")) { | 561 | } else if (command.starts_with("Xfer:libraries:read::")) { |
| 561 | Loader::AppLoader::Modules modules; | 562 | Loader::AppLoader::Modules modules; |
| @@ -757,17 +758,20 @@ void GDBStub::HandleRcmd(const std::vector<u8>& command) { | |||
| 757 | reply = fmt::format("Process: {:#x} ({})\n" | 758 | reply = fmt::format("Process: {:#x} ({})\n" |
| 758 | "Program Id: {:#018x}\n", | 759 | "Program Id: {:#018x}\n", |
| 759 | process->GetProcessId(), process->GetName(), process->GetProgramId()); | 760 | process->GetProcessId(), process->GetName(), process->GetProgramId()); |
| 760 | reply += | 761 | reply += fmt::format("Layout:\n" |
| 761 | fmt::format("Layout:\n" | 762 | " Alias: {:#012x} - {:#012x}\n" |
| 762 | " Alias: {:#012x} - {:#012x}\n" | 763 | " Heap: {:#012x} - {:#012x}\n" |
| 763 | " Heap: {:#012x} - {:#012x}\n" | 764 | " Aslr: {:#012x} - {:#012x}\n" |
| 764 | " Aslr: {:#012x} - {:#012x}\n" | 765 | " Stack: {:#012x} - {:#012x}\n" |
| 765 | " Stack: {:#012x} - {:#012x}\n" | 766 | "Modules:\n", |
| 766 | "Modules:\n", | 767 | GetInteger(page_table.GetAliasRegionStart()), |
| 767 | page_table.GetAliasRegionStart(), page_table.GetAliasRegionEnd(), | 768 | GetInteger(page_table.GetAliasRegionEnd()), |
| 768 | page_table.GetHeapRegionStart(), page_table.GetHeapRegionEnd(), | 769 | GetInteger(page_table.GetHeapRegionStart()), |
| 769 | page_table.GetAliasCodeRegionStart(), page_table.GetAliasCodeRegionEnd(), | 770 | GetInteger(page_table.GetHeapRegionEnd()), |
| 770 | page_table.GetStackRegionStart(), page_table.GetStackRegionEnd()); | 771 | GetInteger(page_table.GetAliasCodeRegionStart()), |
| 772 | GetInteger(page_table.GetAliasCodeRegionEnd()), | ||
| 773 | GetInteger(page_table.GetStackRegionStart()), | ||
| 774 | GetInteger(page_table.GetStackRegionEnd())); | ||
| 771 | 775 | ||
| 772 | for (const auto& [vaddr, name] : modules) { | 776 | for (const auto& [vaddr, name] : modules) { |
| 773 | reply += fmt::format(" {:#012x} - {:#012x} {}\n", vaddr, | 777 | reply += fmt::format(" {:#012x} - {:#012x} {}\n", vaddr, |