[lldb-dev] [Bug 26861] New: Can't proper evaluate std::list and union type in Linux
via lldb-dev
lldb-dev at lists.llvm.org
Sun Mar 6 20:18:03 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26861
Bug ID: 26861
Summary: Can't proper evaluate std::list and union type in
Linux
Product: lldb
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: aert_fudan at hotmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
For the following code:
union S
{
std::int32_t n; // occupies 4 bytes
std::uint16_t s[2]; // occupies 4 bytes
std::uint8_t c; // occupies 1 byte
}; // the whole union occupies 4 bytes
int main(int argc, char *argv[])
{
string str("this is a test");
list<int> l;
unordered_map<int, string> ht;
vector<int> v{1, 2, 3, 4};
S s = {0x12345678};
for (int i = 0; i < v.size(); ++ i) {
printf("i: %d\n", i);
l.push_back(i);
ht[i] = str;
}
return 0; <==== Breakpoint stops here.
}
Result:
(lldb) p l
(std::list<int, std::allocator<int> >) $1 = size=4 {}
(lldb) p s
error: stl 0x00004d65: DW_TAG_member 's' refers to type 0x00004d78 which
extends beyond the bounds of 0x00004d52
(S) $0 = (n = 305419896, s = unsigned short [] @ 0x0000000000aa6550, c = 'x')
Expected:
1. The content of list should be visualized.
2. s.s field should be visualized without emiting error.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160307/23c26997/attachment.html>
More information about the lldb-dev
mailing list