[Lldb-commits] [PATCH] D39837: Clean up NativeRegisterContext

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 9 05:09:41 PST 2017


labath created this revision.
Herald added subscribers: kbarton, kristof.beyls, arichardson, javed.absar, nemanjai, sdardis, aemerson.

This commit removes the concrete_frame_idx member from
NativeRegisterContext and related functions, which was always set to
zero and never used.

I also change the native thread class to store a NativeRegisterContext
as a unique_ptr (documenting the ownership) and make sure it is always
initialized (most of the code was already blindly dereferencing the
register context pointer, assuming it would always be present -- this
makes its treatment consistent).

(I've checked that x86-linux, arm-linux, mips-linux, and x86-netbsd
build after this, the PPC and SystemZ changes are eyeballed.)


https://reviews.llvm.org/D39837

Files:
  include/lldb/Host/common/NativeRegisterContext.h
  include/lldb/Host/common/NativeThreadProtocol.h
  include/lldb/lldb-private-forward.h
  source/Host/common/NativeProcessProtocol.cpp
  source/Host/common/NativeRegisterContext.cpp
  source/Host/common/NativeThreadProtocol.cpp
  source/Plugins/Process/Linux/NativeProcessLinux.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux.h
  source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
  source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
  source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h
  source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
  source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
  source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
  source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
  source/Plugins/Process/Linux/NativeThreadLinux.cpp
  source/Plugins/Process/Linux/NativeThreadLinux.h
  source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
  source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
  source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
  source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
  source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
  source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
  source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
  source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.cpp
  source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39837.122226.patch
Type: text/x-patch
Size: 64235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171109/08ea0b43/attachment-0001.bin>


More information about the lldb-commits mailing list