[all-commits] [llvm/llvm-project] 26b8ea: RegisterInfoPOSIX_arm64 remove unused bytes from g...
Muhammad Omair Javaid via All-commits
all-commits at lists.llvm.org
Tue Dec 1 14:20:17 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 26b8ea2e3782890be96612701866d8ccec616bdc
https://github.com/llvm/llvm-project/commit/26b8ea2e3782890be96612701866d8ccec616bdc
Author: Muhammad Omair Javaid <omair.javaid at linaro.org>
Date: 2020-12-02 (Wed, 02 Dec 2020)
Changed paths:
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
M lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
Log Message:
-----------
RegisterInfoPOSIX_arm64 remove unused bytes from g/G packet
This came up while putting together our new strategy to create g/G packets
in compliance with GDB RSP protocol where register offsets are calculated in
increasing order of register numbers without any unused spacing.
RegisterInfoPOSIX_arm64::GPR size was being calculated after alignment
correction to 8 bytes which meant there was a 4 bytes unused space between
last gpr (cpsr) and first vector register V. We have put LLVM_PACKED_START
decorator on RegisterInfoPOSIX_arm64::GPR to make sure single byte
alignment is enforced. Moreover we are now doing to use arm64 user_pt_regs
struct defined in ptrace.h for accessing ptrace user registers.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D92063
Commit: 78cb4562faa7315fff030593bc6bca4dc033f803
https://github.com/llvm/llvm-project/commit/78cb4562faa7315fff030593bc6bca4dc033f803
Author: Muhammad Omair Javaid <omair.javaid at linaro.org>
Date: 2020-12-02 (Wed, 02 Dec 2020)
Changed paths:
M lldb/include/lldb/Host/common/NativeRegisterContext.h
M lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
M lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
A lldb/test/API/functionalities/gdb_remote_client/TestAArch64XMLRegOffsets.py
M lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py
M lldb/unittests/tools/lldb-server/tests/MessageObjects.cpp
M lldb/unittests/tools/lldb-server/tests/TestClient.cpp
Log Message:
-----------
Make offset field optional in RegisterInfo packet for Arm64
This patch carries forward our aim to remove offset field from qRegisterInfo
packets and XML register description. I have created a new function which
returns if offset fields are dynamic meaning client can calculate offset on
its own based on register number sequence and register size. For now this
function only returns true for NativeRegisterContextLinux_arm64 but we can
test this for other architectures and make it standard later.
As a consequence we do not send offset field from lldb-server (arm64 for now)
while other stubs dont have an offset field so it wont effect them for now.
On the client side we have replaced previous offset calculation algorithm
with a new scheme, where we sort all primary registers in increasing
order of remote regnum and then calculate offset incrementally.
This committ also includes a test to verify all of above functionality
on Arm64.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D91241
Compare: https://github.com/llvm/llvm-project/compare/1b8ed1d03dee...78cb4562faa7
More information about the All-commits
mailing list