summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx33
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;
}