<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Unable to resolve std::vector type in gmodules build on android (linux)"
href="https://bugs.llvm.org/show_bug.cgi?id=37893">37893</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Unable to resolve std::vector type in gmodules build on android (linux)
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>labath@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>To reproduce this, create a simple c++ program with std::vector<int> (from
libc++), compile with -gmodules, and try to display the variable in the
debugger. The variable will show up as empty (no data members).
I've done a bit of digging, and it seems that the issue is that we are unable
to complete the forward-declaration of the "__vector_base" from the main file
with the full declaration in the module.
The interesting bits of dwarf are:
0x000022fd: DW_TAG_variable
DW_AT_location (DW_OP_breg13 SP+116)
DW_AT_name ("numbers")
DW_AT_decl_file ("main.cpp")
DW_AT_decl_line (8)
DW_AT_type (0x00000a1a "vector<int,
std::__ndk1::allocator<int> >")
0x00000a1a: DW_TAG_class_type
DW_AT_name ("vector<int,
std::__ndk1::allocator<int> >")
DW_AT_byte_size (0x0c)
DW_AT_decl_file ("llvm-libc++/include/vector")
DW_AT_decl_line (447)
0x00000a23: DW_TAG_inheritance
DW_AT_type (0x00000053 "__vector_base<int,
std::__ndk1::allocator<int> >")
DW_AT_data_member_location (0x00)
0x00000053: DW_TAG_class_type
DW_AT_name ("__vector_base<int,
std::__ndk1::allocator<int> >")
DW_AT_declaration (true)
The __vector_base type contains a bunch of DW_TAG_typedefs and
DW_TAG_subprograms, but no information on data members. If I open up the same
type in the std.pcm file, I can find the DW_TAG_member entries there. However,
AFAICT, lldb does not try to look for the information in that file.
I don't think this is a recent regression. It has probably been that way since
gmodules was introduced. I just ran into this now because I have started
building lldb tests with libc++, and that meant that gmodules tests actually
started to test something (libstdc++ had no module map file).
Until this and other problems (failure to resolve relocations in the pcm files)
are resolved, I am going to disable the gmodules tests on android.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>