[all-commits] [llvm/llvm-project] 69c39e: [lldb] Fix TestDeletedExecutable on linux
Pavel Labath via All-commits
all-commits at lists.llvm.org
Wed Aug 3 06:44:45 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 69c39e2abc311aa226d54b82a2cc8fa648902c7d
https://github.com/llvm/llvm-project/commit/69c39e2abc311aa226d54b82a2cc8fa648902c7d
Author: Pavel Labath <pavel at labath.sk>
Date: 2022-08-03 (Wed, 03 Aug 2022)
Changed paths:
M lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
M lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp
M lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.h
M lldb/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp
M lldb/source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h
M lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
M lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
M lldb/test/API/functionalities/deleted-executable/TestDeletedExecutable.py
Log Message:
-----------
[lldb] Fix TestDeletedExecutable on linux
Currently, lldb-server was opening the executable file to determine the
process architecture (to differentiate between 32 and 64 bit
architecture flavours). This isn't a particularly trustworthy source of
information (the file could have been changed since the process was
started) and it is not always available (file could be deleted or
otherwise inaccessible).
Unfortunately, ptrace does not give us a direct API to access the
process architecture, but we can still infer it via some of its
responses -- given that the general purpose register set of 64-bit
applications is larger [citation needed] than the GPR set of 32-bit
ones, we can just ask for the application GPR set and check its size.
This is what this patch does.
Differential Revision: https://reviews.llvm.org/D130985
More information about the All-commits
mailing list