Created attachment 7369 [details] example c++ file when debugging a constructor values passed as parameters are shown with wrong values. The problem exist in "GNU gdb (GDB) 7.6" as part of "Dual-target(32 & 64-bit) MinGW compilers for 32 and 64-bit windows" (x64-4.8.1-release-posix-seh-rev5.7z) and in "GNU gdb (Gentoo 7.5.1 p2) 7.5.1". e.g.: Breakpoint 1, Foo::Bar::Bar (this=0x22fd80, senderId=L"\x2788e\000\000j\000\147\022\000\x2b20\341\166\000\000\001\000\000\000\b\000\000\000\245\023@\000\000\001\000\000\000\x26f0e", '\000' <repeats 86 times>, "\330\024@", '\000' <repeats 22 times>, "\055\145\340\166", '\000' <repeats 22 times>, "\101\305\363\166", '\000' <repeats 58 times>...<Address 0x234000 out of bounds>, axes=std::vector of length -572142, capacity 1083994 = {...}, typeId=4711) at ..\..\..\Neo\DumperIssue\DumperIssue.cpp:15 15 int dummy {}; (gdb) axes is the name of the parameter passed, _axes is the member initialized by axes: senderId is a std::wstring which is wrong too. (gdb) p axes $3 = std::vector of length -572142, capacity 1083994 = {6637664, 0, 6637672, 0, 6637672, 0, 4201033, 0, 6629256, 0, 106, 4711, 1994468128, 0, 1, 0, 8, 0, 6...} (gdb) p _axes $4 = std::vector of length 2, capacity 2 = {909, 9090} (gdb)
Created attachment 7370 [details] example c++ header file
Seems to have been a debug info problem on gcc side, since I can reproduce the issue with older gcc versions, but not if compiled with gcc-8 or newer: ``` Breakpoint 1, Foo::Bar::Bar (this=0x22fd10, senderId=L"{1234-5678-9012}", axes=std::vector of length 2, capacity 2 = {...}, typeId=4711) at gdb-16501.cpp:30 30 , _typeId(typeId) (gdb) p axes $1 = std::vector of length 2, capacity 2 = {909, 9090} ```