Fix the handling of FPR offsets in Linux arm/aarch64 register contexts
This should fix the expression evaluation on the Android-aarch64 build bot, but I haven't managed to reproduce the issue locally
Paths
| Differential D12636
Fix the handling of FPR offsets in Linux arm/aarch64 register contexts ClosedPublic Authored by tberghammer on Sep 4 2015, 8:42 AM.
Details Summary Fix the handling of FPR offsets in Linux arm/aarch64 register contexts This should fix the expression evaluation on the Android-aarch64 build bot, but I haven't managed to reproduce the issue locally
Diff Detail Event Timelinetberghammer retitled this revision from to Fix the handling of FPR offsets in Linux arm/aarch64 register contexts. tberghammer updated this object. Herald added subscribers: danalbert, tberghammer, rengolin, aemerson. · View Herald TranscriptSep 4 2015, 8:42 AM labath edited edge metadata. Comment ActionsI would rather see the register variables laid out in a way which makes the offsets meaningful. I.e., instead of having m_fpr, m_gpr, ... we put something like struct Regs { uint32_t gpr[...]; FPU fpu; DREG hbr_regs; ... }; Regs m_registers; Then the byte offset field in Register Info structure will truly correspond to the offset in this structure, and we can index it simply with: assert(offset < sizeof m_register); address = (char *)&m_registers + offset; But if you want to keep this change small then it's ok for now. This revision is now accepted and ready to land.Sep 4 2015, 9:56 AM Comment Actions I prefer to keep it this way because there is no canonical register layout we can rely on so putting them just next to each other would be just an arbitrary layout what might break in the future. If we want the offsets to make sense, then on arm/aarch64 the best approach would be to store the offset from the beginning of the given register set because it will make sense on its own and with the data returned by ptrace. Closed by commit rL246959: Fix the handling of FPR offsets in Linux arm/aarch64 register contexts (authored by tberghammer). · Explain WhySep 7 2015, 3:12 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 34034 source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
source/Plugins/Process/Utility/RegisterContextLinux_arm64.cpp
|