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

Method log

plugins/pdb-ng/src/parser.rs:457–469  ·  view source on GitHub ↗

Lazy logging function that prints like 20MB of messages

(&self, msg: F)

Source from the content-addressed store, hash-verified

455
456 /// Lazy logging function that prints like 20MB of messages
457 pub(crate) fn log<F: FnOnce() -> D, D: Display>(&self, msg: F) {
458 static MEM: OnceLock<bool> = OnceLock::new();
459 let debug_pdb = MEM.get_or_init(|| env::var("BN_DEBUG_PDB").is_ok());
460 if *debug_pdb {
461 let space = "\t".repeat(self.type_stack.len()) + &"\t".repeat(self.symbol_stack.len());
462 let msg = format!("{}", msg());
463 debug!(
464 "{}{}",
465 space,
466 msg.replace("\n", &("\n".to_string() + &space))
467 );
468 }
469 }
470
471 pub(crate) fn split_progress<'b, F: Fn(usize, usize) -> Result<()> + 'b>(
472 original_fn: F,

Callers 15

try_parse_infoMethod · 0.45
collect_nameMethod · 0.45
resolve_missing_ntrsMethod · 0.45
parse_typesMethod · 0.45
handle_type_indexMethod · 0.45
handle_primitive_typeMethod · 0.45
handle_class_typeMethod · 0.45
handle_member_typeMethod · 0.45
handle_method_typeMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected