Open
Description
Description
The binary output of swift compilation (arm64-apple-ios-simulator.swiftinterface
files) contain the information about include paths, in the format of absolute paths.
There is no way to remap these paths to different location for lldb when using ClangImporter
(by compiling with the linker option -add_ast_paths /Path/To/MyModule/arm64-apple-ios-simulator.swiftinterface
).
Steps to reproduce
- Unpack lldb-playground.zip into two locations (
/Path/To/Location1
,/Path/To/Location2
). - Open project from
/Path/To/Location1
. - Build for iOS simulator.
- Create
~/.lldbinit
file with these contents:
settings set target.source-map /var/fake_src_dir /Path/To/Location2
- Open project from
/Path/To/Location2
. - Copy the contents of
$BUILT_PRODUCTS_DIR
folder of project on/Path/To/Location1
into the$BUILT_PRODUCTS_DIR
folder of project on/Path/To/Location2
. - Close project
/Path/To/Location1
, keep working now with the project on/Path/To/Location2
. - Delete
/Path/To/Location1
or move/rename to some other location. - Place breakpoint in
LibWithObjcSwiftObject.swift:9
- Set custom LLDB Init file for
App
scheme to~/.lldbinit
in the scheme settings. - In Xcode, select
Product -> Perform Action -> Run Without Building
- When debugger hits the breakpoint, invoke
po self
in the debugger console.
Expected behavior
po self
command succeeds, the debugDescription
of the object gets printed.
Actual behavior
The error gets printed
warning: /Users/admin/Library/Developer/Xcode/DerivedData/App-aqaccfqqqxedzacxtukhhfcudtbr/Build/Products/Debug-iphonesimulator/App.app/App: Cannot load Swift type information: error: virtual filesystem overlay file '/Path/To/Location1/lldb-playground/buck-out/gen/_p/lZ4mh4iH1C-pub/objc-module-overlay.yaml' not found
error: virtual filesystem overlay file '/Path/To/Location1/lldb-playground/buck-out/gen/_p/lZ4mh4iH1C-pub/objc-module-overlay.yaml' not found
Environment
- Swift compiler version info
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: arm64-apple-macosx13.0
- Xcode version info
Xcode 14.2
Build version 14C18
- Deployment target: iOS 16.2