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 Add support for c++ c...
details: https://anonhg.NetBSD.org/src/rev/fbed47141c34
branches: trunk
changeset: 344267:fbed47141c34
user: christos <christos%NetBSD.org@localhost>
date: Fri Mar 18 17:07:23 2016 +0000
description:
Add support for c++ classes.
diffstat:
external/cddl/osnet/dist/tools/ctf/cvt/ctftools.h | 1 +
external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c | 14 +++++++++++++-
external/cddl/osnet/dist/tools/ctf/cvt/merge.c | 5 +++++
external/cddl/osnet/dist/tools/ctf/cvt/output.c | 1 +
external/cddl/osnet/dist/tools/ctf/cvt/tdata.c | 2 ++
external/cddl/osnet/dist/tools/ctf/cvt/traverse.c | 2 ++
6 files changed, 24 insertions(+), 1 deletions(-)
diffs (169 lines):
diff -r aaec02d0b7aa -r fbed47141c34 external/cddl/osnet/dist/tools/ctf/cvt/ctftools.h
--- a/external/cddl/osnet/dist/tools/ctf/cvt/ctftools.h Fri Mar 18 16:37:09 2016 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/ctftools.h Fri Mar 18 17:07:23 2016 +0000
@@ -142,6 +142,7 @@
FUNCTION,
STRUCT,
UNION,
+ CLASS,
ENUM,
FORWARD,
TYPEDEF,
diff -r aaec02d0b7aa -r fbed47141c34 external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c Fri Mar 18 16:37:09 2016 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c Fri Mar 18 17:07:23 2016 +0000
@@ -186,6 +186,7 @@
case FUNCTION:
case STRUCT:
case UNION:
+ case CLASS:
case ENUM:
return (tdp->t_size);
@@ -223,6 +224,7 @@
case FUNCTION:
case STRUCT:
case UNION:
+ case CLASS:
case ENUM:
case POINTER:
case REFERENCE:
@@ -1162,6 +1164,12 @@
die_sou_create(dw, die, off, tdp, UNION, "union");
}
+static void
+die_class_create(dwarf_t *dw, Dwarf_Die die, Dwarf_Off off, tdesc_t *tdp)
+{
+ die_sou_create(dw, die, off, tdp, CLASS, "class");
+}
+
/*ARGSUSED1*/
static int
die_sou_resolve(tdesc_t *tdp, tdesc_t **tdpp __unused, void *private)
@@ -1196,7 +1204,8 @@
if (mt->t_type == ARRAY && mt->t_ardef->ad_nelems == 0)
continue;
if ((mt->t_flags & TDESC_F_RESOLVED) != 0 &&
- (mt->t_type == STRUCT || mt->t_type == UNION))
+ (mt->t_type == STRUCT || mt->t_type == UNION ||
+ mt->t_type == CLASS))
continue;
if (mt->t_type == STRUCT &&
@@ -1819,6 +1828,7 @@
{ DW_TAG_subroutine_type, 0, die_funcptr_create },
{ DW_TAG_typedef, 0, die_typedef_create },
{ DW_TAG_union_type, 0, die_union_create },
+ { DW_TAG_class_type, 0, die_class_create },
{ DW_TAG_base_type, 0, die_base_create },
{ DW_TAG_const_type, 0, die_const_create },
{ DW_TAG_subprogram, DW_F_NOTDP, die_function_create },
@@ -1895,6 +1905,7 @@
NULL, /* function */
die_sou_resolve, /* struct */
die_sou_resolve, /* union */
+ die_sou_resolve, /* class */
die_enum_resolve, /* enum */
die_fwd_resolve, /* forward */
NULL, /* typedef */
@@ -1913,6 +1924,7 @@
NULL, /* function */
die_sou_failed, /* struct */
die_sou_failed, /* union */
+ die_sou_failed, /* class */
NULL, /* enum */
NULL, /* forward */
NULL, /* typedef */
diff -r aaec02d0b7aa -r fbed47141c34 external/cddl/osnet/dist/tools/ctf/cvt/merge.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/merge.c Fri Mar 18 16:37:09 2016 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/merge.c Fri Mar 18 17:07:23 2016 +0000
@@ -548,6 +548,7 @@
map_td_tree_pre, /* function */
map_td_tree_pre, /* struct */
map_td_tree_pre, /* union */
+ map_td_tree_pre, /* class */
map_td_tree_pre, /* enum */
map_td_tree_pre, /* forward */
map_td_tree_pre, /* typedef */
@@ -566,6 +567,7 @@
map_td_tree_post, /* function */
map_td_tree_post, /* struct */
map_td_tree_post, /* union */
+ map_td_tree_post, /* class */
map_td_tree_post, /* enum */
map_td_tree_post, /* forward */
map_td_tree_post, /* typedef */
@@ -584,6 +586,7 @@
map_td_tree_self_post, /* function */
map_td_tree_self_post, /* struct */
map_td_tree_self_post, /* union */
+ map_td_tree_self_post, /* class */
map_td_tree_self_post, /* enum */
map_td_tree_self_post, /* forward */
map_td_tree_self_post, /* typedef */
@@ -901,6 +904,7 @@
NULL, /* function */
NULL, /* struct */
NULL, /* union */
+ NULL, /* class */
NULL, /* enum */
fwd_redir, /* forward */
NULL, /* typedef */
@@ -1143,6 +1147,7 @@
{ "function", equiv_function, conjure_function },
{ "struct", equiv_su, conjure_su },
{ "union", equiv_su, conjure_su },
+ { "class", equiv_su, conjure_su },
{ "enum", equiv_enum, conjure_enum },
{ "forward", NULL, conjure_forward },
{ "typedef", equiv_plain, conjure_plain },
diff -r aaec02d0b7aa -r fbed47141c34 external/cddl/osnet/dist/tools/ctf/cvt/output.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/output.c Fri Mar 18 16:37:09 2016 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/output.c Fri Mar 18 17:07:23 2016 +0000
@@ -109,6 +109,7 @@
save_type_by_id, /* function */
save_type_by_id, /* struct */
save_type_by_id, /* union */
+ save_type_by_id, /* class */
save_type_by_id, /* enum */
save_type_by_id, /* forward */
save_type_by_id, /* typedef */
diff -r aaec02d0b7aa -r fbed47141c34 external/cddl/osnet/dist/tools/ctf/cvt/tdata.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/tdata.c Fri Mar 18 16:37:09 2016 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/tdata.c Fri Mar 18 17:07:23 2016 +0000
@@ -243,6 +243,7 @@
NULL, /* function */
free_mlist, /* struct */
free_mlist, /* union */
+ free_mlist, /* class */
free_elist, /* enum */
NULL, /* forward */
NULL, /* typedef */
@@ -439,6 +440,7 @@
build_hashes, /* function */
build_hashes, /* struct */
build_hashes, /* union */
+ build_hashes, /* class */
build_hashes, /* enum */
build_hashes, /* forward */
build_hashes, /* typedef */
diff -r aaec02d0b7aa -r fbed47141c34 external/cddl/osnet/dist/tools/ctf/cvt/traverse.c
--- a/external/cddl/osnet/dist/tools/ctf/cvt/traverse.c Fri Mar 18 16:37:09 2016 +0000
+++ b/external/cddl/osnet/dist/tools/ctf/cvt/traverse.c Fri Mar 18 17:07:23 2016 +0000
@@ -124,6 +124,7 @@
NULL, /* function */
NULL, /* struct */
NULL, /* union */
+ NULL, /* class */
NULL, /* enum */
NULL, /* forward */
NULL, /* typedef */
@@ -142,6 +143,7 @@
tdtrav_func, /* function */
tdtrav_su, /* struct */
tdtrav_su, /* union */
+ tdtrav_su, /* class */
NULL, /* enum */
NULL, /* forward */
tdtrav_plain, /* typedef */
Home |
Main Index |
Thread Index |
Old Index