| 7 | using namespace std; |
| 8 | |
| 9 | void |
| 10 | dump_tree(const dwarf::die &node, int depth = 0) |
| 11 | { |
| 12 | printf("%*.s<%" PRIx64 "> %s\n", depth, "", |
| 13 | node.get_section_offset(), |
| 14 | to_string(node.tag).c_str()); |
| 15 | for (auto &attr : node.attributes()) |
| 16 | printf("%*.s %s %s\n", depth, "", |
| 17 | to_string(attr.first).c_str(), |
| 18 | to_string(attr.second).c_str()); |
| 19 | for (auto &child : node) |
| 20 | dump_tree(child, depth + 1); |
| 21 | } |
| 22 | |
| 23 | int |
| 24 | main(int argc, char **argv) |
no test coverage detected