问题
Some context, I'm new to swift, going through a book right now
When looking at exceptions in lldb, when there's a stack frame from a Swift class, the symbol is very hard to read
ex:
_TFC10MyApp16TestViewControllersP01CBLDocumentModel5queryfzT4viewCSo7CBLView4
it looks like lldb just doesn't know how to display the signatures properly-- is there a flag or setting I can change? Or is just a thing that everybody has learned to deal with?
Really the difficult part, for me, is when it prints random letters in the middle of the symbol
回答1:
This has nothing to do with lldb, it’s called name mangling in Swift, and the symbols have very specific meanings. Swift’s name mangling is specifically designed so that the mangled name can be deterministically reconstructed to provide information about the kind of declaration is is, and the scope it lives in, among other things.
来源:https://stackoverflow.com/questions/45250879/why-are-symbols-for-classes-written-in-swift-difficult-to-read-in-lldb-is-it-po