[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 01:54:21 PDT 2019


jankratochvil added a comment.

> {Read,Write}[GF]PR now no longer check whether the supplied buffers are null, because they never are

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.

I did not test these patches but at least I am finally setting up now a (silent) buildbot for `s390x`+`ppc64le` (I haven't found a suitable ARM offer yet).



================
Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp:918
 
-  return ReadRegisterSet(&ioVec, buf_size, NT_PRSTATUS);
+  return ReadRegisterSet(&ioVec, GetGPRSize(), NT_PRSTATUS);
 #endif // __arm__
----------------
This keeps the existing bug in place as the size should be rather `sizeof(ioVec)`. But then `sizeof(ioVec)` is also not much useful as it is used only for `PtraceDisplayBytes`. It is probably considered as a different cleanup patch so this patch does not touch it.



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

https://reviews.llvm.org/D66744





More information about the lldb-commits mailing list