Reputation: 741
I'm debugging a rust program on macos using rust-lldb. It works perfectly for my own code. But when I step into any third-party library or even the standard library, sources are gone (command l
shows nothing). I think maybe the reason is that only my own program was built with debug info, but not the other libraries.
What should I do to make rust-lldb show sources for other libraries during debug?
Upvotes: 1
Views: 582
Reputation: 27110
Debug info is what gives lldb the mapping from instructions to source lines. If a library wasn't built with debug information, then you don't have that mapping and there's no way to reconstruct it after the fact.
Some package managers offer alternate "development" versions of the libraries in a package that include debug information. You might check whether the source for your libraries has a "development" version. If that is not available from the source, you will need to rebuild the libraries you care about so you can get their debug information.
Upvotes: 1