This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: DW_AT_count is the same as DW_AT_upper_bound?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Rouslan Korneychuk <rouslank at msn dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Fri, 5 Jul 2013 21:08:44 +0200
- Subject: Re: DW_AT_count is the same as DW_AT_upper_bound?
- References: <BAY171-W1225181D47297CD8C224728D67D0 at phx dot gbl>
On Fri, 05 Jul 2013 20:41:02 +0200, Rouslan Korneychuk wrote:
> I'm using DW_AT_count instead of DW_AT_upper_bound so that "stack" can
> be empty (have 0 elements), but these two attributes appear to be
> treated the same. Is this a bug or am I misunderstanding something? I'm
> using GDB version 7.5.1.
DW_AT_upper_bound vs. DW_AT_count is described in DWARF-4:
The DW_AT_upper_bound attribute may be replaced by a DW_AT_count
attribute, whose value describes the number of elements in the
subrange rather than the value of the last element.
But your sample DWARF is a case of dynamic bounds which are supported only in
experimental branch(es) so far:
http://sourceware.org/gdb/wiki/FortranVLA
particularly the branch jankratochvil/vla of git://sourceware.org/git/archer.git
Jan