[Lldb-commits] [lldb] [lldb] Add RegisterContextPOSIXCore for RISC-V 64 (PR #93297)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Fri May 24 16:07:10 PDT 2024


================
@@ -0,0 +1,84 @@
+//===-- RegisterContextPOSIXCore_riscv64.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 "RegisterContextPOSIXCore_riscv64.h"
+
+#include "lldb/Utility/DataBufferHeap.h"
+
+using namespace lldb_private;
+
+std::unique_ptr<RegisterContextCorePOSIX_riscv64>
+RegisterContextCorePOSIX_riscv64::Create(
+    lldb_private::Thread &thread, const lldb_private::ArchSpec &arch,
+    const lldb_private::DataExtractor &gpregset,
+    llvm::ArrayRef<lldb_private::CoreNote> notes) {
+  Flags flags = 0;
+
+  auto register_info_up =
+      std::make_unique<RegisterInfoPOSIX_riscv64>(arch, flags);
+  return std::unique_ptr<RegisterContextCorePOSIX_riscv64>(
----------------
jasonmolenda wrote:

Please make this return object a `std::make_unique` too, it will be shorter.

https://github.com/llvm/llvm-project/pull/93297


More information about the lldb-commits mailing list