Debugging externally compiled code
Debugging externally compiled code
- Subject: Debugging externally compiled code
- From: Andrew Keller <email@hidden>
- Date: Tue, 21 Jan 2014 15:28:24 -0500
Hi all,
I'm working on a not-so-small cross-platform project. The codebase is split between the cross-platform parts, and the platform-specific parts. The cross-platform parts (largely C / C++) are compiled into a static library using Waf. From there, it was pretty easy to point Xcode at the generated libraries, and link against them.
Now that that's working, it would be nice if I could debug the parts of the code compiled outside of Xcode. I started by teaching Waf about a new build configuration ("debug"), where the optimization level is set to zero, and debug symbols are included. Upon inspecting the generated libraries, I can see that the debug information exists (some of the source paths are relative, and probably won't work with other working directories, but they are at least there).
So far so good.
Next, I go to Xcode, and I set a break point somewhere that will eventually lead to the externally compiled code, and I trigger the break point. I step through the code using Xcode's debugger, and into the externally compiled library.
However, when Xcode's debugger gets into the externally compiled library, it no longer displays the source code. Instead, it displays the assembly, with some comments distributed around that reference filenames and line numbers in the external source code.
Does anyone have any ideas on how to get Xcode to display the external source files in the debugger? I have a hunch that the problem is caused by using relative paths in the debug symbols, but I'm having trouble finding a way to either tell Clang to use absolute paths when generating debug symbols, or inform lldb of new search paths for source files.
Thanks,
Andrew Keller
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden