<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:paul_robinson@playstation.sony.com" title="Paul Robinson <paul_robinson@playstation.sony.com>"> <span class="fn">Paul Robinson</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Debug info generated for arrays is not what GDB expects (not as good as GCC's)"
href="https://bugs.llvm.org/show_bug.cgi?id=30553">bug 30553</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>FIXED
</td>
<td>---
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Debug info generated for arrays is not what GDB expects (not as good as GCC's)"
href="https://bugs.llvm.org/show_bug.cgi?id=30553#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Debug info generated for arrays is not what GDB expects (not as good as GCC's)"
href="https://bugs.llvm.org/show_bug.cgi?id=30553">bug 30553</a>
from <span class="vcard"><a class="email" href="mailto:paul_robinson@playstation.sony.com" title="Paul Robinson <paul_robinson@playstation.sony.com>"> <span class="fn">Paul Robinson</span></a>
</span></b>
<pre>Reopened on behalf of Carlos Enciso, who made this comment on Phabricator
post-commit:
Hi @sdesmalen!
First of all my apologies for commenting after the issue has been closed, but I
do not have an account to add a comment to the associated bugzilla.
I have found what it seems to be an issue with the current implementation.
For the given test case
int main() {
int size = 2;
int vla_expr[size];
vla_expr[1] = 1;
return 0;
}
and while debugging with LLDB, the following error is generated:
(lldb) n
Process 21014 stopped
* thread #1, name = 'bad.out', stop reason = step over
frame #0: 0x0000000000400502 bad.out`main at vla_2.cpp:7
4 int vla_expr[size];
5 vla_expr[1] = 1;
6
-> 7 return 0;
8 }
(lldb) p vla_expr
(unsigned long) $0 = 2
(lldb) p vla_expr[1]
error: subscripted value is not an array, pointer, or vector
(lldb)
Looking at the DWARF generated, there are 2 variables with the same name at the
same scope
DW_TAG_subprogram "main"
...
DW_TAG_variable "size"
DW_TAG_variable "vla_expr"
DW_TAG_variable "vla_expr"
I think there are 2 issues:
The compiler generated variable 'vla_expr'
- should be flagged as artificial (DW_AT_artificial)
- its name should start with double underscore to avoid conflicting with
user-defined names.
Thanks,
Carlos</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>