[Lldb-commits] [lldb] [llvm] [lldb][Process/FreeBSDKernel] Add ppc64le support (PR #180669)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 10 07:28:36 PST 2026
================
@@ -0,0 +1,95 @@
+//===-- RegisterContextFreeBSDKernel_ppc64le.cpp
+//---------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "RegisterContextFreeBSDKernel_ppc64le.h"
+
+#include "lldb/Target/Process.h"
+#include "lldb/Target/Thread.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "llvm/Support/Endian.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+RegisterContextFreeBSDKernel_ppc64le::RegisterContextFreeBSDKernel_ppc64le(
+ Thread &thread, lldb_private::RegisterInfoInterface *register_info,
+ lldb::addr_t pcb_addr)
+ : RegisterContextPOSIX_ppc64le(thread, 0, register_info),
+ m_pcb_addr(pcb_addr) {}
+
+bool RegisterContextFreeBSDKernel_ppc64le::ReadRegister(
+ const RegisterInfo *reg_info, RegisterValue &value) {
+ if (m_pcb_addr == LLDB_INVALID_ADDRESS)
+ return false;
+
+ // https://cgit.freebsd.org/src/tree/sys/powerpc/include/pcb.h
----------------
DavidSpickett wrote:
I assume "powerpc" in the FreeBSD context means 64-bit, right?
https://github.com/llvm/llvm-project/pull/180669
More information about the lldb-commits
mailing list