Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/tools/ctf/cvt Clang 3.7 and newer p...



details:   https://anonhg.NetBSD.org/src/rev/f3ba1c549b40
branches:  trunk
changeset: 343692:f3ba1c549b40
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Feb 20 23:09:03 2016 +0000

description:
Clang 3.7 and newer provide the array size via DW_AT_count, not via
DW_AT_upper_bound. Recognize the former as well as the latter.

diffstat:

 external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 528594bd6003 -r f3ba1c549b40 external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c    Sat Feb 20 22:08:44 2016 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c    Sat Feb 20 23:09:03 2016 +0000
@@ -693,6 +693,10 @@
                ar->ad_nelems = uval + 1;
        else if (die_signed(dw, dim, DW_AT_upper_bound, &sval, 0))
                ar->ad_nelems = sval + 1;
+       if (die_unsigned(dw, dim, DW_AT_count, &uval, 0))
+               ar->ad_nelems = uval + 1;
+       else if (die_signed(dw, dim, DW_AT_count, &sval, 0))
+               ar->ad_nelems = sval + 1;
        else
                ar->ad_nelems = 0;
 



Home | Main Index | Thread Index | Old Index