[lldb] [Process/FreeBSDRemote] Optimize regset pointer logic
authorMichał Górny <mgorny@moritz.systems>
Fri, 13 Nov 2020 09:48:29 +0000 (10:48 +0100)
committerMichał Górny <mgorny@moritz.systems>
Mon, 16 Nov 2020 12:03:02 +0000 (13:03 +0100)
commitb9734c6b44e52fd94f9fe19f8ce60f55c4d3819c
tree96bf60da18bf4c4245a8ceac361e1045d162bafb
parent68ca01eb50af0a4aca06c90a4ce1eb78029603f6
[lldb] [Process/FreeBSDRemote] Optimize regset pointer logic

Create a helper GetOffsetRegSetData() method to get pointer
to the regset data accounting for the necessary offset.  Establish
the offsets in the constructor and store them in the structure.  This
avoids having to add new Get*Offset() methods and combines some common
code.

Differential Revision: https://reviews.llvm.org/D91411
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.h