================
@@ -0,0 +1,101 @@
+//===-- RegisterContextFreeBSDKernel_arm.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_arm.h"
+#include "Plugins/Process/Utility/lldb-arm-register-enums.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_arm::RegisterContextFreeBSDKernel_arm(
+    Thread &thread, std::unique_ptr<RegisterInfoPOSIX_arm> register_info_up,
+    lldb::addr_t pcb_addr)
+    : RegisterContextPOSIX_arm(thread, std::move(register_info_up)),
+      m_pcb_addr(pcb_addr) {}
+
+bool RegisterContextFreeBSDKernel_arm::ReadGPR() { return true; }
+
+bool RegisterContextFreeBSDKernel_arm::ReadFPR() { return true; }
+
+bool RegisterContextFreeBSDKernel_arm::WriteGPR() {
+  assert(0);
+  return false;
+}
+
+bool RegisterContextFreeBSDKernel_arm::WriteFPR() {
+  assert(0);
+  return false;
+}
+
+bool RegisterContextFreeBSDKernel_arm::ReadRegister(
+    const RegisterInfo *reg_info, RegisterValue &value) {
+  if (m_pcb_addr == LLDB_INVALID_ADDRESS)
+    return false;
+
+  // https://cgit.freebsd.org/src/tree/sys/arm/include/frame.h
+  // struct pcb's first field is struct switchframe which is the only field 
used
+  // by debugger should be aligned by 8 bytes
----------------
DavidSpickett wrote:

Are you missing an "and" here? "by debugger and should be aligned...".

Also comments should be proper sentences - 
https://llvm.org/docs/CodingStandards.html#commenting. In this case, end with a 
full stop.

https://github.com/llvm/llvm-project/pull/180674
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to