-
Notifications
You must be signed in to change notification settings - Fork 296
Struct with struct members displays incorrectly #656
Copy link
Copy link
Closed
Description
When I step into a function that takes a struct with multiple struct members, the watch/local/hover window fails to display the information correctly.
I've created a small example program that demonstrates the issue. Note that the struct displays correctly in the scope it's created, but when I step into f1 the watch window shows garbage.
#include <windows.h>
struct Bar1 {
int a;
};
struct Bar2 {
int b;
};
struct Foo {
Bar1 b1;
Bar2 b2;
int c;
};
void f2(Foo f) {
OutputDebugStringA("f2");
}
void f1(Foo f) {
f2(f);
OutputDebugStringA("f1");
}
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {
Foo foo = {};
foo.b1.a = 1;
foo.b2.b = 2;
foo.c = 3;
f1(foo);
return 0;
}
Compilation command: cl main.cpp -Od -ZI
MSVC version: Version 19.44.35216 for x64
Debugger version: 0.9.22 ALPHA
Am I missing something?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels