[Lldb-commits] [PATCH] D66744: NativeProcessLinux: Remove some register context boilerplate

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 27 03:47:13 PDT 2019


jankratochvil added a comment.

In D66744#1646572 <https://reviews.llvm.org/D66744#1646572>, @labath wrote:

> In D66744#1646514 <https://reviews.llvm.org/D66744#1646514>, @jankratochvil wrote:
>
> > But then there is `NativeRegisterContextLinux_x86_64::GetFPRBuffer()`. Which is never used so maybe together with `NativeRegisterContextLinux_x86_64::GetFPRSize()` they could be just `assert(0);`. It can be also considered as a different cleanup patch.
>
>
> Hm.. I didn't notice that. I'll put that in separately. Ideally, I'd say these functions should be used, but that may require more cleanups in the x86 register context, such as detecting the register type earlier on instead of just when the operations fail.


If it is left as runtime detected then the current default implementation of `NativeRegisterContextLinux::ReadFPR()` and `NativeRegisterContextLinux::WriteFPR()` could be also another class layer with that `virtual void *GetFPRBuffer() = 0; virtual size_t GetFPRSize() = 0;`.


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

https://reviews.llvm.org/D66744





More information about the lldb-commits mailing list