(
view: &BinaryView,
dwarf: &Dwarf<R>,
unit: &Unit<R>,
graph: &FlowGraph,
graph_parent: &FlowGraphNode,
die_node: EntriesTreeNode<R>,
)
| 238 | } |
| 239 | |
| 240 | fn process_tree<R: Reader>( |
| 241 | view: &BinaryView, |
| 242 | dwarf: &Dwarf<R>, |
| 243 | unit: &Unit<R>, |
| 244 | graph: &FlowGraph, |
| 245 | graph_parent: &FlowGraphNode, |
| 246 | die_node: EntriesTreeNode<R>, |
| 247 | ) { |
| 248 | // Namespaces only - really interesting to look at! |
| 249 | // if (die_node.entry().tag() == constants::DW_TAG_namespace) |
| 250 | // || (die_node.entry().tag() == constants::DW_TAG_class_type) |
| 251 | // || (die_node.entry().tag() == constants::DW_TAG_compile_unit) |
| 252 | // || (die_node.entry().tag() == constants::DW_TAG_subprogram) |
| 253 | // { |
| 254 | let new_node = FlowGraphNode::new(graph); |
| 255 | |
| 256 | let attr_string = get_info_string(view, dwarf, unit, die_node.entry()); |
| 257 | new_node.set_lines(attr_string); |
| 258 | |
| 259 | graph.append(&new_node); |
| 260 | graph_parent.add_outgoing_edge( |
| 261 | BranchType::UnconditionalBranch, |
| 262 | &new_node, |
| 263 | EdgeStyle::default(), |
| 264 | ); |
| 265 | |
| 266 | let mut children = die_node.children(); |
| 267 | while let Some(child) = children.next().unwrap() { |
| 268 | process_tree(view, dwarf, unit, graph, &new_node, child); |
| 269 | } |
| 270 | // } |
| 271 | } |
| 272 | |
| 273 | fn dump_dwarf(bv: &BinaryView) { |
| 274 | let view = if bv.section_by_name(".debug_info").is_some() { |
no test coverage detected