[Lldb-commits] [lldb] [lldb][FreeBSDKernel] Implement trapframe unwinding (PR #192184)
Minsoo Choo via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 15 04:28:33 PDT 2026
================
@@ -0,0 +1,260 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 "PlatformFreeBSDKernel.h"
+
+#include "lldb/Core/Module.h"
+#include "lldb/Core/PluginManager.h"
+#include "lldb/Symbol/Symbol.h"
+#include "lldb/Symbol/Symtab.h"
+#include "lldb/Symbol/UnwindPlan.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Utility/LLDBLog.h"
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/StreamString.h"
+#include "llvm/TargetParser/Triple.h"
+
+#include <set>
+
+using namespace lldb;
+using namespace lldb_private;
+using namespace lldb_private::platform_freebsdkernel;
+
+LLDB_PLUGIN_DEFINE(PlatformFreeBSDKernel)
+
+static uint32_t g_initialize_count = 0;
+
+PlatformFreeBSDKernel::PlatformFreeBSDKernel() : Platform(/*is_host=*/false) {
+ const llvm::Triple::ArchType arches[] = {
+ llvm::Triple::arm, // arm32 (legacy)
+ llvm::Triple::aarch64, // arm64
+ llvm::Triple::ppc64le, // powerpc64le
+ llvm::Triple::riscv64, // riscv64
+ llvm::Triple::x86, // i386 (legacy)
+ llvm::Triple::x86_64, // amd64
+ };
+
+ for (auto arch : arches) {
+ ArchSpec spec;
+ spec.SetTriple(llvm::Triple(llvm::Triple::getArchTypeName(arch), "unknown",
+ "freebsd"));
+ m_supported_architectures.push_back(spec);
----------------
mchoo7 wrote:
With userspace binary:
```console
(lldb) platform status
Platform: host
...
```
https://github.com/llvm/llvm-project/pull/192184
More information about the lldb-commits
mailing list