This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/16501] New: std::wstring and std::vector are shown with wrong information when debugging a constructor


https://sourceware.org/bugzilla/show_bug.cgi?id=16501

            Bug ID: 16501
           Summary: std::wstring and std::vector are shown with wrong
                    information when debugging a constructor
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: sourceware.org at tropp dot de

Created attachment 7369
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7369&action=edit
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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]