MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / process_tree

Function process_tree

plugins/dwarf/dwarfdump/src/lib.rs:240–271  ·  view source on GitHub ↗
(
    view: &BinaryView,
    dwarf: &Dwarf<R>,
    unit: &Unit<R>,
    graph: &FlowGraph,
    graph_parent: &FlowGraphNode,
    die_node: EntriesTreeNode<R>,
)

Source from the content-addressed store, hash-verified

238}
239
240fn 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
273fn dump_dwarf(bv: &BinaryView) {
274 let view = if bv.section_by_name(".debug_info").is_some() {

Callers 1

dump_dwarfFunction · 0.85

Calls 6

get_info_stringFunction · 0.85
set_linesMethod · 0.80
appendMethod · 0.45
add_outgoing_edgeMethod · 0.45
childrenMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected