RegisterInfoPOSIX_arm64 remove unused bytes from g/G packet
authorMuhammad Omair Javaid <omair.javaid@linaro.org>
Tue, 1 Dec 2020 22:09:14 +0000 (03:09 +0500)
committerMuhammad Omair Javaid <omair.javaid@linaro.org>
Tue, 1 Dec 2020 22:19:39 +0000 (03:19 +0500)
commit26b8ea2e3782890be96612701866d8ccec616bdc
treebce61a27d01eb75e161f3b86e4d4ce1a8c7debfc
parent1b8ed1d03dee63fd0b787ab52d0b195df9c35b9c
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
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h