[Lldb-commits] [PATCH] D20368: Remove Platform usages from NativeProcessLinux

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed May 18 07:47:19 PDT 2016


labath created this revision.
labath added reviewers: tberghammer, omjavaid, nitesh.jain, uweigand.
labath added a subscriber: lldb-commits.
Herald added a subscriber: aemerson.

this removes the last usage of the Platform plugin in NPL. It was being used for determining the
architecture of a running process locating the ELF file belonging to the process and parsing it.
Given that we are already attached to the process we can replace this with a more reliable method
using the "official" ptrace API for that (it doesn't look very official, but this is what e.g.
strace uses).

Together with a followup change, which I am in the process of preparing, this will shrink
lldb-server by 4%--9% (mostly depending on how large the file is right now -- i.e., if it
includes instruction emulator plugins).

Tested on x86 and arm.

http://reviews.llvm.org/D20368

Files:
  source/Plugins/Process/Linux/NativeProcessLinux.cpp
  source/Plugins/Process/Linux/NativeProcessLinux.h
  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_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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20368.57622.patch
Type: text/x-patch
Size: 36720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160518/2bd49816/attachment-0001.bin>


More information about the lldb-commits mailing list