diff options
author | Dave Brolley <brolley@redhat.com> | 2009-04-30 11:45:09 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-04-30 11:45:09 -0400 |
commit | b03d329d5ad9d22d684b61859971a7b12b5e5104 (patch) | |
tree | c32105776a6c009ed96f5c1a2205849f8cda647d /tapsets.cxx | |
parent | 4c797c5eaeb10d8d22501c5ad82766b69d8cf988 (diff) | |
parent | 3ba2eb82cafa938c1c3f7ef9d2da06912a49d8e0 (diff) | |
download | systemtap-steved-b03d329d5ad9d22d684b61859971a7b12b5e5104.tar.gz systemtap-steved-b03d329d5ad9d22d684b61859971a7b12b5e5104.tar.xz systemtap-steved-b03d329d5ad9d22d684b61859971a7b12b5e5104.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index 01b2a45b..eac69322 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -2090,6 +2090,13 @@ struct dwflpp ++i; break; + case DW_TAG_enumeration_type: + throw semantic_error ("field '" + + e->components[i].second + + "' vs. enum type " + + string(dwarf_diename_integrate (die) ?: "<anonymous type>"), + e->tok); + break; case DW_TAG_base_type: throw semantic_error ("field '" + e->components[i].second @@ -2939,7 +2946,7 @@ dwflpp::has_single_line_record (dwarf_query * q, char const * srcfile, int linen * only picks up top level stuff (i.e. nothing in a lower scope) */ int dwflpp::iterate_over_globals (int (* callback)(Dwarf_Die *, void *), - void * data) + void * data) { int rc = DWARF_CB_OK; Dwarf_Die die; @@ -2951,18 +2958,20 @@ dwflpp::iterate_over_globals (int (* callback)(Dwarf_Die *, void *), if (dwarf_child(cu, &die) != 0) return rc; - do { - /* We're only currently looking for structures and unions, + do + /* We're only currently looking for named types, * although other types of declarations exist */ - if (dwarf_tag(&die) != DW_TAG_structure_type && - dwarf_tag(&die) != DW_TAG_union_type) - continue; - - rc = (*callback)(&die, data); - if (rc != DWARF_CB_OK) - break; - - } while (dwarf_siblingof(&die, &die) == 0); + switch (dwarf_tag(&die)) + { + case DW_TAG_base_type: + case DW_TAG_enumeration_type: + case DW_TAG_structure_type: + case DW_TAG_typedef: + case DW_TAG_union_type: + rc = (*callback)(&die, data); + break; + } + while (rc == DWARF_CB_OK && dwarf_siblingof(&die, &die) == 0); return rc; } |