diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-02-23 18:23:41 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-02-23 18:23:41 +0100 |
commit | 3c1f71d54d487806d4dfde0421b43e95d3662ea5 (patch) | |
tree | 6694b88fac63e9554adce2d01a436d38f56cfe83 /tapsets.cxx | |
parent | 98e45bcea73ee4642e6bfda672f5266089cb5586 (diff) | |
download | systemtap-steved-3c1f71d54d487806d4dfde0421b43e95d3662ea5.tar.gz systemtap-steved-3c1f71d54d487806d4dfde0421b43e95d3662ea5.tar.xz systemtap-steved-3c1f71d54d487806d4dfde0421b43e95d3662ea5.zip |
Check whether a die has any children before iterating over it.
* tapsets.cxx (iterate_over_cu_labels): Check dwarf_child result.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index 78d5a5b3..5d9d062f 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1330,7 +1330,10 @@ struct dwflpp const char * sym = label_val.c_str(); Dwarf_Die die; - dwarf_child (cu, &die); + int res = dwarf_child (cu, &die); + if (res != 0) + return; // die without children, bail out. + static string function_name; do { |