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 Grr, gcc-5.4 creates ...



details:   https://anonhg.NetBSD.org/src/rev/fbfe8e3a9bd1
branches:  trunk
changeset: 345785:fbfe8e3a9bd1
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jun 08 21:32:27 2016 +0000

description:
Grr, gcc-5.4 creates DW_AT_typedef without DW_AT_type for HARD_REG_SET!

 <1><c26b>: Abbrev Number: 4 (DW_TAG_typedef)
    <c26c>   DW_AT_name        : (indirect string, offset: 0x16e30): HARD_REG_ELT_TYPE
    <c270>   DW_AT_decl_file   : 57
    <c271>   DW_AT_decl_line   : 43
    <c272>   DW_AT_type        : <0x70>
 <1><c276>: Abbrev Number: 102 (DW_TAG_typedef)
    <c277>   DW_AT_name        : (indirect string, offset: 0x2f954): HARD_REG_SET
    <c27b>   DW_AT_decl_file   : 57
    <c27c>   DW_AT_decl_line   : 54

diffstat:

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

diffs (24 lines):

diff -r 371ecff03c7e -r fbfe8e3a9bd1 external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c    Wed Jun 08 19:28:47 2016 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c    Wed Jun 08 21:32:27 2016 +0000
@@ -1224,8 +1224,18 @@
                            (mt->t_name == NULL || mt->t_name[0] == '\0'))
                            continue;
 
-                       printf("%s unresolved type = %d (%s)\n", tdesc_name(tdp),
-                               mt->t_type, tdesc_name(mt));
+                       /*
+                        * XXX: Gcc-5.4 DW_TAG_typedef without DW_AT_type;
+                        * assume pointer
+                        */
+                       if (mt->t_id == TID_VOID) {
+                           ml->ml_size = dw->dw_ptrsz;
+                           continue;
+                       }
+
+                       fprintf(stderr, "%s unresolved type=%d (%s) tid=%#x\n", 
+                           tdesc_name(tdp), mt->t_type, tdesc_name(mt),
+                           mt->t_id);
                        dw->dw_nunres++;
                        return (1);
                }



Home | Main Index | Thread Index | Old Index