[Lldb-commits] [PATCH] D69371: [ARM64] Cleanup and speedup NativeRegisterContextLinux_arm64

Muhammad Omair Javaid via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 24 02:32:46 PDT 2019


omjavaid created this revision.
omjavaid added reviewers: labath, clayborg.
Herald added a subscriber: kristof.beyls.

This patch simplifies register accesses in NativeRegisterContextLinux_arm64 and also adds some bare minimum caching to avoid multiple calls to ptrace during a stop.

Linux ptrace returns data in the form of structures containing GPR/FPR data. This means that one single call is enough to read all GPRs or FPRs. We do that once per stop and keep reading from or writing to the buffer that we have in NativeRegisterContextLinux_arm64 class. Before a resume or detach we write all buffers back.

This is tested on aarch64 thunder x1 with Ubuntu 18.04. Also tested regressions on x86_64.


https://reviews.llvm.org/D69371

Files:
  include/lldb/Host/common/NativeRegisterContext.h
  source/Plugins/Process/Linux/NativeProcessLinux.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69371.226214.patch
Type: text/x-patch
Size: 14621 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191024/cb51ba92/attachment-0001.bin>


More information about the lldb-commits mailing list