]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ctf: fix off-by-one in emitted array bounds
authorNick Alcock <nick.alcock@oracle.com>
Thu, 9 Aug 2012 23:33:14 +0000 (00:33 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:40:29 +0000 (22:40 +0100)
commitfa9f3942a92d05f2a7e9387c7a8b68c29aef8de9
treef3820cb5e242c055c73a0b38d6311cc4ea8e6a0d
parent817803ef378bdf115895afb2bc5d2d58276a6a10
ctf: fix off-by-one in emitted array bounds

We were treating arrays described by DW_AT_count and DW_AT_upper_bound
identically, but in a language like C with zero-based arrays they are not:
DW_AT_upper_bound does not give the number of members unless you add one
to it.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
scripts/dwarf2ctf/dwarf2ctf.c