From 16145e2f21d7f7208c95d164a0fe2b1a5d8c20d6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 29 Sep 2018 17:58:26 -0400 Subject: arm_interface: Add missing fpsr/tpidr members to the ThreadContext struct Internally within the kernel, it also includes a member variable for the floating-point status register, and TPIDR, so we should do the same here to match it. While we're at it, also fix up the size of the struct and add a static assertion to ensure it always stays the correct size. --- src/core/gdbstub/gdbstub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/gdbstub/gdbstub.cpp') diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index d8c7b3492..ae88440c2 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp @@ -250,7 +250,7 @@ static void RegWrite(std::size_t id, u64 val, Kernel::Thread* thread = nullptr) } else if (id == PC_REGISTER) { thread->context.pc = val; } else if (id == PSTATE_REGISTER) { - thread->context.pstate = val; + thread->context.pstate = static_cast(val); } else if (id > PSTATE_REGISTER && id < FPCR_REGISTER) { thread->context.vector_registers[id - (PSTATE_REGISTER + 1)][0] = val; } -- cgit v1.2.3 From cf9d6c6f526fffb2bf414ff774c5d0281a73ecf4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 29 Sep 2018 18:47:00 -0400 Subject: kernel/process: Make data member variables private Makes the public interface consistent in terms of how accesses are done on a process object. It also makes it slightly nicer to reason about the logic of the process class, as we don't want to expose everything to external code. --- src/core/gdbstub/gdbstub.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/gdbstub/gdbstub.cpp') diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index ae88440c2..5bc947010 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp @@ -587,7 +587,7 @@ static void HandleQuery() { strlen("Xfer:features:read:target.xml:")) == 0) { SendReply(target_xml); } else if (strncmp(query, "Offsets", strlen("Offsets")) == 0) { - const VAddr base_address = Core::CurrentProcess()->vm_manager.GetCodeRegionBaseAddress(); + const VAddr base_address = Core::CurrentProcess()->VMManager().GetCodeRegionBaseAddress(); std::string buffer = fmt::format("TextSeg={:0x}", base_address); SendReply(buffer.c_str()); } else if (strncmp(query, "fThreadInfo", strlen("fThreadInfo")) == 0) { @@ -909,7 +909,7 @@ static void ReadMemory() { SendReply("E01"); } - const auto& vm_manager = Core::CurrentProcess()->vm_manager; + const auto& vm_manager = Core::CurrentProcess()->VMManager(); if (addr < vm_manager.GetCodeRegionBaseAddress() || addr >= vm_manager.GetMapRegionEndAddress()) { return SendReply("E00"); -- cgit v1.2.3