Bug 11632

Summary: vla: Fix: C VLAs should use DW_AT_allocated
Product: gdb Reporter: Jan Kratochvil <jan>
Component: expAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gdb-prs, tromey, tromey
Priority: P2    
Version: archer   
Target Milestone: 7.1   
Host: Target:
Build: Last reconfirmed:

Description Jan Kratochvil 2010-05-24 19:53:15 UTC
GCC counterpart:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42801#c3

# Unfortunately, gdb prints 0 instead of 24 in the second case.
Comment 1 Tom Tromey 2014-05-08 17:55:45 UTC
I think it is probably purely a gcc bug now.
The gdb bits work if the source is compiled -O1.
With -O0 I believe the debuginfo is somewhat incorrect
until "a" is "really" in scope.
Comment 2 Tom Tromey 2023-02-18 00:28:23 UTC
This works now.

(gdb) ptype a
type = char [5]