| 776 | } |
| 777 | |
| 778 | std::string GdbServer::GetThreadStatus(horizon::kernel::GuestThread* thread, |
| 779 | Signal signal) { |
| 780 | const auto& state = thread->GetThread()->GetState(); |
| 781 | return fmt::format("T{:02x}{:02x}:{};{:02x}:{};{:02x}:{};thread:{:x};", |
| 782 | static_cast<u8>(signal), PC_REGISTER, state.pc, |
| 783 | SP_REGISTER, state.sp, LR_REGISTER, state.lr, |
| 784 | GET_THREAD_ID(thread)); |
| 785 | } |
| 786 | |
| 787 | std::string GdbServer::PageFromBuffer(std::string_view buffer, |
| 788 | std::string_view page) { |