Dave Lee 580fdeb6ff
[lldb] Test global variable support of dwim-print (NFC) (#157908)
DIL has made `frame variable` support global variables, which in turn
means dwim-print inherits support for global variables.
2025-09-11 15:55:11 -07:00

26 lines
375 B
C++

extern "C" int puts(const char *s);
extern int gGlobal;
int gGlobal = 23;
struct Structure {
int number = 30;
void f() { puts("break inside"); }
};
struct Wrapper {
Structure s;
};
struct Opaque;
int main(int argc, char **argv) {
Structure s;
Wrapper w;
Wrapper *wp = &w;
Opaque *opaque = (Opaque *)(void *)&s;
puts("break here");
s.f();
return 0;
}