[Lldb-commits] [PATCH] D40133: elf-core: Convert remaining register context to use register set maps
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 16 08:16:02 PST 2017
labath created this revision.
Herald added subscribers: kbarton, kristof.beyls, javed.absar, nemanjai, emaste, aemerson.
In https://reviews.llvm.org/D39681, we started using a map instead passing a long list of
register sets to the ppc64le register context. However, existing
register sets were still using the old method.
This converts remaining register contexts to use the register set map.
While doing this, I realized that using OS-specific keys for the map was
not a good idea, as sometimes we have a register context shared between
two OSs (e.g. linux and freebsd share the arm/arm64 register contexts).
Therefore, I create a new enum to represent register sets in an
OS-independent manner (the enum contains the generic GPR and FPR values,
but the rest of the values are likely to be architecture-specific).
This saves a bit of code now, but the real impact I see here is that it
can potentially pave the way for reduction of the number of register
context classes (for example RegisterContextPOSIXCore_arm and
RegisterContextPOSIXCore_arm64 are identical except that we initialize
them with a different RegisterInfoInterface object).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 28352 bytes
Desc: not available
More information about the lldb-commits