【发布时间】:2021-07-01 23:23:40
【问题描述】:
所有,
考虑以下类结构:
class Base -> class public Derived1 -> class public Derived2.
即有一个基类。 Derived1 类是 Base 的直接子代,Derived2 类是 Derived2 的直接子代,但不是 Base。
LLDB 中有没有办法查看类结构?
我正在尝试在 OSX 上使用 LLDB 调试我的程序,但很难看到变量的类树。
我尝试过:
> p (Derived1 *) this
但它没有帮助 - 它只是在输出中显示了相同的 (Derived2) 类及其地址。
谢谢。
编辑:
尝试
v *this
结果:
(lldb) v *this
error: the version command takes no arguments.
(lldb)
编辑2:
这是我得到的:
Igors-MacBook-Air:Debug igorkorot$ lldb
(lldb) version
lldb-902.0.79.7
Swift-4.1
(lldb)
【问题讨论】: