forked from OSchip/llvm-project
36e82208c7
Summary: The ObjectFile class was used to determine the architecture of a running process by inspecting it's main executable. There were two issues with this: - it's in the wrong layer - the call can be very expensive (it can end up computing the crc of the whole file). Since the process is running on the host, ideally we would be able to just query the data straight from the OS like darwin does, but there doesn't seem to be a reasonable way to do that. So, this fixes the layering issue by using the llvm object library to inspect the file. Since we know the process is already running on the host, we just need to peek at a few bytes of the elf header to determine whether it's 32- or 64-bit (which should make this faster as well). Pretty much the same logic was implemented in NativeProcessProtocol::ResolveProcessArchitecture, so I delete this logic and replace calls with GetProcessInfo. Reviewers: eugene, krytarowski Subscribers: mgorny, hintonda, lldb-commits Differential Revision: https://reviews.llvm.org/D42488 llvm-svn: 323637 |
||
---|---|---|
.. | ||
linux | ||
CMakeLists.txt | ||
FileSpecTest.cpp | ||
FileSystemTest.cpp | ||
HostInfoTest.cpp | ||
HostTest.cpp | ||
MainLoopTest.cpp | ||
SocketAddressTest.cpp | ||
SocketTest.cpp | ||
SymbolsTest.cpp | ||
TaskPoolTest.cpp |