【发布时间】:2018-08-27 16:19:04
【问题描述】:
除非我声明一个默认变量,否则为什么 lldb 的 expression 不能理解我的 C 结构?
struct YD_MENU {
char menu_name[10];
int menu_option;
};
int main() {
return 0;
}
在 main 中添加断点...
(lldb) exp struct YD_MENU $b
error: variable has incomplete type 'struct YD_MENU'
forward declaration of 'YD_MENU'
如果我将其更改为以下...
struct YD_MENU {
char menu_name[10];
int menu_option;
} default_menu;
(lldb) exp struct YD_MENU $a 工作正常。
我认为这与Why can't LLDB evaluate this expression? 有关,但建议的答案不起作用。
(lldb) version
lldb-1000.0.29
【问题讨论】: