[Lldb-commits] [PATCH] D76471: Remap the target SDK directory to the host SDK directory

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 27 17:39:48 PDT 2020


aprantl updated this revision to Diff 253257.
aprantl added a comment.
Herald added a subscriber: mgorny.

I've reworked this a little based on your feedback.

First, I've renamed `SDK` to `XcodeSDK`. An Xcode SDK is a fairly specific concept and I'm not going to pretend that it makes sense to generalize it for something else, so I thought the name should reflect this. I've kept it in Utility though, since the functionality mirrors `ArchSpec` and one platform typically hosts many SDKs at the same time. I entertained the idea of creating a base class and each platform would implement its own SDK, which sounds neat, but with all the merging functionality needed, this doesn't really work out.

I did incorporate the suggestion of requesting a platform (because I do think it should be Platform or Host that is calling `xcrun`) via the Module's ArchSpec.

Finally I added unit tests for all of the SDK functionality.

I have no great idea for how to test the remapping functionality other than completely end-to-end, because its primary effect is showing when debugging the OS itself (you need to resolve files *inside* the SDK).

Let me know what you think!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76471/new/

https://reviews.llvm.org/D76471

Files:
  lldb/include/lldb/Core/Module.h
  lldb/include/lldb/Target/Platform.h
  lldb/include/lldb/Utility/XcodeSDK.h
  lldb/source/Core/Module.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h
  lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
  lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
  lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h
  lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
  lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Utility/CMakeLists.txt
  lldb/source/Utility/XcodeSDK.cpp
  lldb/unittests/Platform/PlatformDarwinTest.cpp
  lldb/unittests/Utility/CMakeLists.txt
  lldb/unittests/Utility/XcodeSDKTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76471.253257.patch
Type: text/x-patch
Size: 33430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200328/3333f624/attachment-0001.bin>


More information about the lldb-commits mailing list