[Lldb-commits] [PATCH] D26295: Change UnwindAssemblyInstEmulation to remove a register location instead of marking it as IsSame()
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 3 21:06:05 PDT 2016
jasonmolenda created this revision.
jasonmolenda added reviewers: labath, tberghammer.
jasonmolenda added a subscriber: lldb-commits.
jasonmolenda set the repository for this revision to rL LLVM.
This is a minor change and maybe more of a personal preference, but UnwindAssemblyInstEmulation marks registers that have been restored to their original values as "IsSame" - which is equivalent to the UnwindPlan not mentioning a location for the register at all. When I look at an unwind plan while a function is executing it's epilogue, the output looks like
row[14]: 520: CFA=sp+320 => x8=[CFA-240] x19= <same> x20= <same> x21= <same> x22= <same> x23=[CFA-56] x24=[CFA-64] x25=[CFA-72] x26=[CFA-80] x27=[CFA-88] x28=[CFA-96] fp= <same> lr= <same>
row[15]: 524: CFA=sp+320 => x8=[CFA-240] x19= <same> x20= <same> x21= <same> x22= <same> x23= <same> x24= <same> x25=[CFA-72] x26=[CFA-80] x27=[CFA-88] x28=[CFA-96] fp= <same> lr= <same>
row[16]: 528: CFA=sp+320 => x8=[CFA-240] x19= <same> x20= <same> x21= <same> x22= <same> x23= <same> x24= <same> x25= <same> x26= <same> x27=[CFA-88] x28=[CFA-96] fp= <same> lr= <same>
row[17]: 532: CFA=sp +0 => x8=[CFA-240] x19= <same> x20= <same> x21= <same> x22= <same> x23= <same> x24= <same> x25= <same> x26= <same> x27= <same> x28= <same> fp= <same> lr= <same>
etc. If we remove the registers from the row, the unwind dump will read like
row[14]: 516: CFA=sp+96 => x8=[CFA-240] x21=[CFA-40] x22=[CFA-48] x23=[CFA-56] x24=[CFA-64] x25=[CFA-72] x26=[CFA-80] x27=[CFA-88] x28=[CFA-96]
row[15]: 520: CFA=sp+96 => x8=[CFA-240] x23=[CFA-56] x24=[CFA-64] x25=[CFA-72] x26=[CFA-80] x27=[CFA-88] x28=[CFA-96]
row[16]: 524: CFA=sp+96 => x8=[CFA-240] x25=[CFA-72] x26=[CFA-80] x27=[CFA-88] x28=[CFA-96]
row[17]: 528: CFA=sp+96 => x8=[CFA-240] x27=[CFA-88] x28=[CFA-96]
There's no functional difference between the two (there SHOULD be no functional difference) - but I think it's a bit easier to read without the IsSame's. Does anyone care one way or the other?
Repository:
rL LLVM
https://reviews.llvm.org/D26295
Files:
source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26295.76908.patch
Type: text/x-patch
Size: 4924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161104/955452df/attachment.bin>
More information about the lldb-commits
mailing list