Why can't lldb's expression
understand my C Struct unless I declare a default variable?
struct YD_MENU {
char menu_name[10];
int menu_option;
};
int main() {
return 0;
}
Adding a breakpoint inside of main...
(lldb) exp struct YD_MENU $b
error: variable has incomplete type 'struct YD_MENU'
forward declaration of 'YD_MENU'
If I change it to the following...
struct YD_MENU {
char menu_name[10];
int menu_option;
} default_menu;
(lldb) exp struct YD_MENU $a
works fine.
I think this is related to Why can't LLDB evaluate this expression? but the proposed answers don't work.
(lldb) version
lldb-1000.0.29