[Lldb-commits] [PATCH] D99571: Update ProcessMachCore::DoLoadCore to handle binary hints with and without addresses
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 30 03:10:31 PDT 2021
jasonmolenda created this revision.
jasonmolenda added a project: LLDB.
Herald added a subscriber: JDevlieghere.
jasonmolenda requested review of this revision.
ProcessMachCore::DoLoadCore was implemented to handle the two LC_NOTEs "kern ver str" and "main bin spec" with only certain combinations of UUID and address and type present. Other groups are starting to adopt these corefile hints and there are combinations that lldb wouldn't handle correctly.
This patch cleans up the handling of these hints in DoLoadCore a lot -- I've been wanting to clean this up for over a year now -- and adds tests for all of the combinations.
I did make one change to DynamicLoaderStatic to only set load addresses of Sections to their file addresses (slide==0) if an address hasn't already been set. This gives me the ability to set the load address in ProcessMachCore and have it not get re-set back to the original file address later by the dynamic loader plugin.
The rest of this patch is is code that's my little playground of ProcessMachCore, so I don't know if others will have any comments, but I wanted to open it to the floor if anyone has suggestions or questions.
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 21370 bytes
Desc: not available
More information about the lldb-commits