[Lldb-commits] [PATCH] D91216: [lldb] [Process/FreeBSDRemote] Access GPR via reginfo offsets
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 12 06:01:55 PST 2020
mgorny added inline comments.
================
Comment at: lldb/unittests/Process/FreeBSD/RegisterContextFreeBSDTests.cpp:26-31
+#define ASSERT_REG(regname, offset, size) \
+ { \
+ const RegisterInfo *reg_info = ®_ctx.GetRegisterInfo()[lldb_##regname]; \
+ EXPECT_EQ(reg_info->byte_offset, offset); \
+ EXPECT_EQ(reg_info->byte_size, size); \
+ }
----------------
labath wrote:
> ```
> pair<size_t(?), size_t> GetRegParams(const RegisterContext &ctx, unsigned reg) {
> const RegisterInfo &info = reg_ctx.GetRegisterInfo()[reg];
> return {info.byte_offset, info.byte_size};
> }
> ```
Fun fact: `RegisterContextFreeBSD_*` is not a `RegisterContext&` but a `RegisterInfoInterface&` ;-).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91216/new/
https://reviews.llvm.org/D91216
More information about the lldb-commits
mailing list