为什么用lldb很难阅读用Swift编写的类的符号?有可能改变吗? [英] Why are symbols for classes written in Swift difficult to read in lldb? Is it possible to change this?

查看:80
本文介绍了为什么用lldb很难阅读用Swift编写的类的符号?有可能改变吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在某些情况下,我是新手,现在就读一本书

Some context, I'm new to swift, going through a book right now

查看lldb中的异常时, 当有Swift类的堆栈框架时,该符号很难阅读

When looking at exceptions in lldb, when there's a stack frame from a Swift class, the symbol is very hard to read

例如: _TFC10MyApp16TestViewControllersP01CBLDocumentModel5queryfzT4viewCSo7CBLView4

看起来lldb只是不知道如何正确显示签名-是否有可以更改的标志或设置?还是仅仅是每个人都学会了应对的事情?

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

推荐答案

这与lldb无关,在Swift中称为 name mangling ,符号带有

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.

这篇关于为什么用lldb很难阅读用Swift编写的类的符号?有可能改变吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆