[Lldb-commits] [PATCH] D138407: [LLDB] Add LoongArch register definitions and operations

Lu Weining via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 22 04:47:22 PST 2022


SixWeining added inline comments.


================
Comment at: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp:27
+// NT_PRSTATUS and NT_FPREGSET definition
+#include <elf.h>
+
----------------
[[ https://llvm.org/docs/CodingStandards.html#include-style | Should be sorted lexicographically by the full path ]]. So put it before `sys/uio.h`. 


================
Comment at: lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_loongarch64.cpp:138
+size_t RegisterInfoPOSIX_loongarch64::GetRegisterSetCount() const {
+  return k_num_register_sets - 1;
+}
----------------
Why `-  1`?


================
Comment at: lldb/source/Plugins/Process/Utility/RegisterInfos_loongarch64.h:35
+  {                                                                            \
+    loongarch_dwarf::dwarf_##reg, loongarch_dwarf::dwarf_##reg, generic_kind,          \
+    LLDB_INVALID_REGNUM, reg##_loongarch                                           \
----------------
unnecessary indent?


================
Comment at: lldb/source/Plugins/Process/Utility/RegisterInfos_loongarch64.h:56
+
+#define DEFINE_FPR64(reg, generic_kind)                                        \
+  {                                                                            \
----------------
Not allow accessing FPR registers through ABI names?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138407/new/

https://reviews.llvm.org/D138407



More information about the lldb-commits mailing list