summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-12-18 17:14:06 -0500
committerMason Reed <35282038+emesare@users.noreply.github.com>2026-01-11 10:36:01 -0800
commit6f75ca031aa7e8f7e1c706d1880b202137b1996f (patch)
tree1fe8e778f98e4390a1075fc402047e23f2128934 /plugins
parent168a3fd34824adc9c6a606cd144219701f15cccf (diff)
[Rust] Enter more session scoped tracing spans for debug info and binary view callbacks
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dwarf/dwarf_export/Cargo.toml1
-rw-r--r--plugins/dwarf/dwarf_export/src/lib.rs1
-rw-r--r--plugins/dwarf/dwarf_import/Cargo.toml1
-rw-r--r--plugins/dwarf/dwarf_import/demo/Cargo.toml1
-rw-r--r--plugins/dwarf/dwarf_import/src/die_handlers.rs1
-rw-r--r--plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs1
-rw-r--r--plugins/dwarf/dwarf_import/src/functions.rs1
-rw-r--r--plugins/dwarf/dwarf_import/src/helpers.rs2
-rw-r--r--plugins/dwarf/dwarf_import/src/lib.rs1
-rw-r--r--plugins/dwarf/dwarf_import/src/types.rs1
-rw-r--r--plugins/idb_import/Cargo.toml1
-rw-r--r--plugins/idb_import/src/lib.rs1
-rw-r--r--plugins/pdb-ng/Cargo.toml1
-rw-r--r--plugins/pdb-ng/demo/Cargo.toml1
-rw-r--r--plugins/pdb-ng/src/lib.rs63
-rw-r--r--plugins/pdb-ng/src/parser.rs11
-rw-r--r--plugins/pdb-ng/src/struct_grouper.rs5
-rw-r--r--plugins/pdb-ng/src/type_parser.rs9
-rw-r--r--plugins/svd/Cargo.toml1
-rw-r--r--plugins/svd/demo/Cargo.toml1
-rw-r--r--plugins/svd/src/lib.rs1
-rw-r--r--plugins/svd/src/mapper.rs1
-rw-r--r--plugins/warp/Cargo.toml1
-rw-r--r--plugins/warp/demo/Cargo.toml1
-rw-r--r--plugins/warp/src/cache.rs2
-rw-r--r--plugins/warp/src/container/disk.rs1
-rw-r--r--plugins/warp/src/container/network.rs1
-rw-r--r--plugins/warp/src/container/network/client.rs1
-rw-r--r--plugins/warp/src/convert/types.rs1
-rw-r--r--plugins/warp/src/plugin.rs2
-rw-r--r--plugins/warp/src/plugin/commit.rs1
-rw-r--r--plugins/warp/src/plugin/create.rs1
-rw-r--r--plugins/warp/src/plugin/debug.rs2
-rw-r--r--plugins/warp/src/plugin/ffi/container.rs1
-rw-r--r--plugins/warp/src/plugin/file.rs1
-rw-r--r--plugins/warp/src/plugin/function.rs1
-rw-r--r--plugins/warp/src/plugin/load.rs1
-rw-r--r--plugins/warp/src/plugin/project.rs1
-rw-r--r--plugins/warp/src/plugin/workflow.rs1
-rw-r--r--plugins/warp/src/processor.rs1
-rw-r--r--plugins/workflow_objc/Cargo.toml1
-rw-r--r--plugins/workflow_objc/demo/Cargo.toml2
-rw-r--r--plugins/workflow_objc/src/activities/objc_msg_send_calls.rs1
-rw-r--r--plugins/workflow_objc/src/activities/objc_msg_send_calls/rewrite_to_direct_call.rs1
-rw-r--r--plugins/workflow_objc/src/activities/remove_memory_management.rs1
-rw-r--r--plugins/workflow_objc/src/activities/super_init.rs1
-rw-r--r--plugins/workflow_objc/src/lib.rs2
-rw-r--r--plugins/workflow_objc/src/metadata/global_state.rs2
-rw-r--r--plugins/workflow_objc/src/workflow.rs1
49 files changed, 62 insertions, 78 deletions
diff --git a/plugins/dwarf/dwarf_export/Cargo.toml b/plugins/dwarf/dwarf_export/Cargo.toml
index 81c8a017..74cd774e 100644
--- a/plugins/dwarf/dwarf_export/Cargo.toml
+++ b/plugins/dwarf/dwarf_export/Cargo.toml
@@ -12,3 +12,4 @@ binaryninja.workspace = true
binaryninjacore-sys.workspace = true
gimli = "^0.31"
object = { version = "0.32.1", features = ["write"] }
+tracing = "0.1" \ No newline at end of file
diff --git a/plugins/dwarf/dwarf_export/src/lib.rs b/plugins/dwarf/dwarf_export/src/lib.rs
index bc7d3c27..284ca34b 100644
--- a/plugins/dwarf/dwarf_export/src/lib.rs
+++ b/plugins/dwarf/dwarf_export/src/lib.rs
@@ -7,7 +7,6 @@ use binaryninja::{
confidence::Conf,
rc::Ref,
symbol::SymbolType,
- tracing,
types::{MemberAccess, StructureType, Type, TypeClass},
};
use gimli::{
diff --git a/plugins/dwarf/dwarf_import/Cargo.toml b/plugins/dwarf/dwarf_import/Cargo.toml
index f71d4cf4..d01c60b1 100644
--- a/plugins/dwarf/dwarf_import/Cargo.toml
+++ b/plugins/dwarf/dwarf_import/Cargo.toml
@@ -20,3 +20,4 @@ cpp_demangle = "0.4.3"
regex = "1"
indexmap = "2.5.0"
object = "0.36"
+tracing = "0.1"
diff --git a/plugins/dwarf/dwarf_import/demo/Cargo.toml b/plugins/dwarf/dwarf_import/demo/Cargo.toml
index 3a5ad601..d4418edd 100644
--- a/plugins/dwarf/dwarf_import/demo/Cargo.toml
+++ b/plugins/dwarf/dwarf_import/demo/Cargo.toml
@@ -21,3 +21,4 @@ cpp_demangle = "0.4.3"
regex = "1"
indexmap = "2.5.0"
object = "0.36"
+tracing = "0.1" \ No newline at end of file
diff --git a/plugins/dwarf/dwarf_import/src/die_handlers.rs b/plugins/dwarf/dwarf_import/src/die_handlers.rs
index b4b526a0..cf81b698 100644
--- a/plugins/dwarf/dwarf_import/src/die_handlers.rs
+++ b/plugins/dwarf/dwarf_import/src/die_handlers.rs
@@ -18,7 +18,6 @@ use crate::{helpers::*, ReaderType};
use binaryninja::{
rc::*,
- tracing,
types::{EnumerationBuilder, FunctionParameter, ReferenceType, Type, TypeBuilder},
};
diff --git a/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs b/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs
index 397e07a3..fbf7e7df 100644
--- a/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs
+++ b/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs
@@ -25,7 +25,6 @@ use binaryninja::{
rc::*,
symbol::SymbolType,
template_simplifier::simplify_str_to_fqn,
- tracing,
types::{FunctionParameter, Type},
variable::NamedVariableWithType,
};
diff --git a/plugins/dwarf/dwarf_import/src/functions.rs b/plugins/dwarf/dwarf_import/src/functions.rs
index 709cea62..6755f847 100644
--- a/plugins/dwarf/dwarf_import/src/functions.rs
+++ b/plugins/dwarf/dwarf_import/src/functions.rs
@@ -19,7 +19,6 @@ use crate::types::get_type;
use crate::{helpers::*, ReaderType};
use binaryninja::template_simplifier::simplify_str_to_str;
-use binaryninja::tracing;
use cpp_demangle::DemangleOptions;
use gimli::{constants, AttributeValue, DebuggingInformationEntry, Dwarf, Operation, Unit};
use regex::Regex;
diff --git a/plugins/dwarf/dwarf_import/src/helpers.rs b/plugins/dwarf/dwarf_import/src/helpers.rs
index d2654d98..c7855b25 100644
--- a/plugins/dwarf/dwarf_import/src/helpers.rs
+++ b/plugins/dwarf/dwarf_import/src/helpers.rs
@@ -18,12 +18,12 @@ use std::{str::FromStr, sync::mpsc};
use crate::{DebugInfoBuilderContext, ReaderType};
use binaryninja::binary_view::BinaryViewBase;
+use binaryninja::Endianness;
use binaryninja::{
binary_view::{BinaryView, BinaryViewExt},
download::{DownloadInstanceInputOutputCallbacks, DownloadProvider},
settings::Settings,
};
-use binaryninja::{tracing, Endianness};
use gimli::Dwarf;
use gimli::{
constants, Attribute, AttributeValue,
diff --git a/plugins/dwarf/dwarf_import/src/lib.rs b/plugins/dwarf/dwarf_import/src/lib.rs
index e227a459..1ed3ce19 100644
--- a/plugins/dwarf/dwarf_import/src/lib.rs
+++ b/plugins/dwarf/dwarf_import/src/lib.rs
@@ -34,7 +34,6 @@ use binaryninja::{
debuginfo::{CustomDebugInfoParser, DebugInfo, DebugInfoParser},
settings::Settings,
template_simplifier::simplify_str_to_str,
- tracing,
};
use dwarfreader::create_section_reader_object;
diff --git a/plugins/dwarf/dwarf_import/src/types.rs b/plugins/dwarf/dwarf_import/src/types.rs
index 45ccf74e..cb8880ec 100644
--- a/plugins/dwarf/dwarf_import/src/types.rs
+++ b/plugins/dwarf/dwarf_import/src/types.rs
@@ -18,7 +18,6 @@ use crate::{die_handlers::*, ReaderType};
use binaryninja::{
rc::*,
- tracing,
types::{
BaseStructure, MemberAccess, MemberScope, ReferenceType, StructureBuilder, StructureType,
Type, TypeClass,
diff --git a/plugins/idb_import/Cargo.toml b/plugins/idb_import/Cargo.toml
index 4a958106..9ba241d2 100644
--- a/plugins/idb_import/Cargo.toml
+++ b/plugins/idb_import/Cargo.toml
@@ -13,3 +13,4 @@ anyhow = { version = "1.0.86", features = ["backtrace"] }
binaryninja.workspace = true
binaryninjacore-sys.workspace = true
idb-rs = { git = "https://github.com/Vector35/idb-rs", tag = "0.1.12" }
+tracing = "0.1" \ No newline at end of file
diff --git a/plugins/idb_import/src/lib.rs b/plugins/idb_import/src/lib.rs
index 3564df11..f285f554 100644
--- a/plugins/idb_import/src/lib.rs
+++ b/plugins/idb_import/src/lib.rs
@@ -19,7 +19,6 @@ use idb_rs::til::section::TILSection;
use idb_rs::til::TypeVariant as TILTypeVariant;
use anyhow::{anyhow, Result};
-use binaryninja::tracing;
struct IDBDebugInfoParser;
impl CustomDebugInfoParser for IDBDebugInfoParser {
diff --git a/plugins/pdb-ng/Cargo.toml b/plugins/pdb-ng/Cargo.toml
index e77dac5b..08776df2 100644
--- a/plugins/pdb-ng/Cargo.toml
+++ b/plugins/pdb-ng/Cargo.toml
@@ -14,6 +14,7 @@ binaryninjacore-sys.workspace = true
itertools = "0.14"
pdb = { git = "https://github.com/Vector35/pdb-rs", rev = "6016177" }
regex = "1"
+tracing = "0.1"
[features]
demo = [] \ No newline at end of file
diff --git a/plugins/pdb-ng/demo/Cargo.toml b/plugins/pdb-ng/demo/Cargo.toml
index bde9b28c..590cacca 100644
--- a/plugins/pdb-ng/demo/Cargo.toml
+++ b/plugins/pdb-ng/demo/Cargo.toml
@@ -15,6 +15,7 @@ binaryninjacore-sys.workspace = true
itertools = "0.14"
pdb = { git = "https://github.com/Vector35/pdb-rs", rev = "6016177" }
regex = "1"
+tracing = "0.1"
[features]
demo = []
diff --git a/plugins/pdb-ng/src/lib.rs b/plugins/pdb-ng/src/lib.rs
index 5bbbb53e..86ae1cdd 100644
--- a/plugins/pdb-ng/src/lib.rs
+++ b/plugins/pdb-ng/src/lib.rs
@@ -28,7 +28,6 @@ use binaryninja::debuginfo::{CustomDebugInfoParser, DebugInfo, DebugInfoParser};
use binaryninja::download::{DownloadInstanceInputOutputCallbacks, DownloadProvider};
use binaryninja::interaction::{MessageBoxButtonResult, MessageBoxButtonSet};
use binaryninja::settings::{QueryOptions, Settings};
-use binaryninja::tracing::{debug, error, info};
use binaryninja::{interaction, user_directory};
use parser::PDBParserInstance;
@@ -162,7 +161,7 @@ fn parse_sym_srv(symbol_path: &str, default_store: String) -> Result<impl Iterat
fn read_from_sym_store(bv: &BinaryView, path: &str) -> Result<(bool, Vec<u8>)> {
if !path.contains("://") {
// Local file
- info!("Read local file: {}", path);
+ tracing::info!("Read local file: {}", path);
let conts = fs::read(path)?;
return Ok((false, conts));
}
@@ -182,7 +181,7 @@ fn read_from_sym_store(bv: &BinaryView, path: &str) -> Result<(bool, Vec<u8>)> {
}
};
- info!("GET: {}", path);
+ tracing::info!("GET: {}", path);
let dp =
DownloadProvider::try_default().map_err(|_| anyhow!("No default download provider"))?;
@@ -397,9 +396,9 @@ impl PDBParser {
if info.age != pdb_info.age {
if info.age > pdb_info.age {
// Have not seen this case, so I'm not sure if this is fatal
- info!("PDB age is older than our binary! Loading it anyway, but there may be missing information.");
+ tracing::info!("PDB age is older than our binary! Loading it anyway, but there may be missing information.");
} else {
- info!("PDB age is newer than our binary! Loading it anyway, there probably shouldn't be any issues.");
+ tracing::info!("PDB age is newer than our binary! Loading it anyway, there probably shouldn't be any issues.");
}
}
@@ -424,7 +423,7 @@ impl PDBParser {
match fs::create_dir_all(&cab_path) {
Ok(_) => true,
Err(e) => {
- error!("Could not create PDB cache dir: {}", e);
+ tracing::error!("Could not create PDB cache dir: {}", e);
false
}
}
@@ -433,10 +432,10 @@ impl PDBParser {
cab_path.push(&info.file_name);
match fs::write(&cab_path, conts) {
Ok(_) => {
- info!("Downloaded to: {}", cab_path.to_string_lossy());
+ tracing::info!("Downloaded to: {}", cab_path.to_string_lossy());
}
Err(e) => {
- error!("Could not write PDB to cache: {}", e)
+ tracing::error!("Could not write PDB to cache: {}", e)
}
}
}
@@ -461,7 +460,7 @@ impl PDBParser {
match fs::create_dir_all(&cab_path) {
Ok(_) => true,
Err(e) => {
- error!("Could not create PDB cache dir: {}", e);
+ tracing::error!("Could not create PDB cache dir: {}", e);
false
}
}
@@ -470,16 +469,19 @@ impl PDBParser {
cab_path.push(&info.file_name);
match fs::write(&cab_path, conts) {
Ok(_) => {
- info!("Downloaded to: {}", cab_path.to_string_lossy());
+ tracing::info!(
+ "Downloaded to: {}",
+ cab_path.to_string_lossy()
+ );
}
Err(e) => {
- error!("Could not write PDB to cache: {}", e)
+ tracing::error!("Could not write PDB to cache: {}", e)
}
}
}
}
}
- Err(e) => error!("Could not get local cache for writing: {}", e),
+ Err(e) => tracing::error!("Could not get local cache for writing: {}", e),
}
}
} else {
@@ -512,11 +514,11 @@ impl PDBParser {
let mut inst = match PDBParserInstance::new(debug_info, view, pdb) {
Ok(inst) => {
- info!("Loaded PDB, parsing...");
+ tracing::info!("Loaded PDB, parsing...");
inst
}
Err(e) => {
- error!("Could not open PDB: {}", e);
+ tracing::error!("Could not open PDB: {}", e);
return Err(e);
}
};
@@ -524,11 +526,11 @@ impl PDBParser {
(*progress)(cur, max).map_err(|_| anyhow!("Cancelled"))
})) {
Ok(()) => {
- info!("Parsed pdb");
+ tracing::info!("Parsed pdb");
Ok(())
}
Err(e) => {
- error!("Could not parse PDB: {}", e);
+ tracing::error!("Could not parse PDB: {}", e);
if e.to_string() == "Todo" {
Ok(())
} else {
@@ -563,7 +565,7 @@ impl CustomDebugInfoParser for PDBParser {
Ok(_) => return true,
Err(e) if e.to_string() == "Cancelled" => return false,
Err(_) => {
- error!("Chosen PDB file failed to load");
+ tracing::error!("Chosen PDB file failed to load");
return false;
}
}
@@ -587,12 +589,12 @@ impl CustomDebugInfoParser for PDBParser {
{
Ok(_) => return true,
Err(e) if e.to_string() == "Cancelled" => return false,
- Err(e) => debug!("Skipping, {}", e.to_string()),
+ Err(e) => tracing::debug!("Skipping, {}", e.to_string()),
}
}
Ok(None) => {}
e => {
- error!("Error searching symbol store {}: {:?}", store, e)
+ tracing::error!("Error searching symbol store {}: {:?}", store, e)
}
}
}
@@ -607,10 +609,10 @@ impl CustomDebugInfoParser for PDBParser {
{
Ok(_) => return true,
Err(e) if e.to_string() == "Cancelled" => return false,
- Err(e) => debug!("Skipping, {}", e.to_string()),
+ Err(e) => tracing::debug!("Skipping, {}", e.to_string()),
},
Err(e) if e.to_string() == "Cancelled" => return false,
- Err(e) => debug!("Could not read pdb: {}", e.to_string()),
+ Err(e) => tracing::debug!("Could not read pdb: {}", e.to_string()),
}
}
@@ -625,10 +627,10 @@ impl CustomDebugInfoParser for PDBParser {
{
Ok(_) => return true,
Err(e) if e.to_string() == "Cancelled" => return false,
- Err(e) => debug!("Skipping, {}", e.to_string()),
+ Err(e) => tracing::debug!("Skipping, {}", e.to_string()),
},
Err(e) if e.to_string() == "Cancelled" => return false,
- Err(e) => debug!("Could not read pdb: {}", e.to_string()),
+ Err(e) => tracing::debug!("Could not read pdb: {}", e.to_string()),
}
}
@@ -651,11 +653,11 @@ impl CustomDebugInfoParser for PDBParser {
) {
Ok(_) => return true,
Err(e) if e.to_string() == "Cancelled" => return false,
- Err(e) => debug!("Skipping, {}", e.to_string()),
+ Err(e) => tracing::debug!("Skipping, {}", e.to_string()),
},
Err(e) if e.to_string() == "Cancelled" => return false,
Err(e) => {
- debug!("Could not read pdb: {}", e.to_string())
+ tracing::debug!("Could not read pdb: {}", e.to_string())
}
}
}
@@ -671,13 +673,14 @@ impl CustomDebugInfoParser for PDBParser {
{
Ok(_) => return true,
Err(e) if e.to_string() == "Cancelled" => return false,
- Err(e) => debug!("Skipping, {}", e.to_string()),
+ Err(e) => tracing::debug!("Skipping, {}", e.to_string()),
}
}
Ok(None) => {}
- e => error!(
+ e => tracing::error!(
"Error searching local symbol store {}: {:?}",
- local_store_path, e
+ local_store_path,
+ e
),
}
}
@@ -693,12 +696,12 @@ impl CustomDebugInfoParser for PDBParser {
match self.load_from_file(&conts, debug_info, view, &progress, true, true) {
Ok(_) => return true,
Err(e) if e.to_string() == "Cancelled" => return false,
- Err(e) => debug!("Skipping, {}", e.to_string()),
+ Err(e) => tracing::debug!("Skipping, {}", e.to_string()),
}
}
Ok(None) => {}
e => {
- error!("Error searching remote symbol server {}: {:?}", server, e)
+ tracing::error!("Error searching remote symbol server {}: {:?}", server, e)
}
}
}
diff --git a/plugins/pdb-ng/src/parser.rs b/plugins/pdb-ng/src/parser.rs
index 708bc34a..82a2bd75 100644
--- a/plugins/pdb-ng/src/parser.rs
+++ b/plugins/pdb-ng/src/parser.rs
@@ -30,7 +30,6 @@ use binaryninja::debuginfo::{DebugFunctionInfo, DebugInfo};
use binaryninja::platform::Platform;
use binaryninja::rc::Ref;
use binaryninja::settings::{QueryOptions, Settings};
-use binaryninja::tracing::{debug, info};
use binaryninja::types::{
EnumerationBuilder, NamedTypeReference, NamedTypeReferenceClass, StructureBuilder,
StructureType, Type, TypeClass,
@@ -172,7 +171,7 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> {
.add_type(&name.to_string(), ty.as_ref(), &[]); // TODO : Components
}
- info!(
+ tracing::info!(
"PDB found {} types (before resolving NTRs)",
self.named_types.len()
);
@@ -198,9 +197,9 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> {
)?;
}
- info!("PDB found {} types", self.named_types.len());
- info!("PDB found {} data variables", symbols.len());
- info!("PDB found {} functions", functions.len());
+ tracing::info!("PDB found {} types", self.named_types.len());
+ tracing::info!("PDB found {} data variables", symbols.len());
+ tracing::info!("PDB found {} functions", functions.len());
let allow_void = self.settings.get_bool_with_opts(
"pdb.features.allowVoidGlobals",
@@ -462,7 +461,7 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> {
if *debug_pdb {
let space = "\t".repeat(self.type_stack.len()) + &"\t".repeat(self.symbol_stack.len());
let msg = format!("{}", msg());
- debug!(
+ tracing::debug!(
"{}{}",
space,
msg.replace("\n", &("\n".to_string() + &space))
diff --git a/plugins/pdb-ng/src/struct_grouper.rs b/plugins/pdb-ng/src/struct_grouper.rs
index 8143ff42..378d8c3b 100644
--- a/plugins/pdb-ng/src/struct_grouper.rs
+++ b/plugins/pdb-ng/src/struct_grouper.rs
@@ -15,7 +15,6 @@
use crate::type_parser::ParsedMember;
use anyhow::{anyhow, Result};
use binaryninja::confidence::{Conf, MAX_CONFIDENCE};
-use binaryninja::tracing::{debug, warn};
use binaryninja::types::{MemberAccess, MemberScope, StructureBuilder, StructureType, Type};
use std::cmp::Ordering;
use std::env;
@@ -358,7 +357,7 @@ pub fn group_structure(
apply_groups(members, structure, groups, 0);
}
Err(e) => {
- warn!("{} Could not resolve structure groups: {}", name, e);
+ tracing::warn!("{} Could not resolve structure groups: {}", name, e);
for member in members {
match (member.bitfield_position, member.bitfield_size) {
(Some(bit_pos), bit_width) => {
@@ -1189,6 +1188,6 @@ fn test_bool_modifier() {
fn log<F: FnOnce() -> D, D: Display>(msg: F) {
// println!("{}", msg());
if env::var("BN_DEBUG_PDB").is_ok() {
- debug!("{}", msg());
+ tracing::debug!("{}", msg());
}
}
diff --git a/plugins/pdb-ng/src/type_parser.rs b/plugins/pdb-ng/src/type_parser.rs
index e22489a9..2ab2a0cc 100644
--- a/plugins/pdb-ng/src/type_parser.rs
+++ b/plugins/pdb-ng/src/type_parser.rs
@@ -24,7 +24,6 @@ use binaryninja::calling_convention::CoreCallingConvention;
use binaryninja::confidence::{Conf, MAX_CONFIDENCE};
use binaryninja::platform::Platform;
use binaryninja::rc::Ref;
-use binaryninja::tracing::warn;
use binaryninja::types::{
BaseStructure, EnumerationBuilder, EnumerationMember, FunctionParameter, MemberAccess,
MemberScope, NamedTypeReference, NamedTypeReferenceClass, StructureBuilder, StructureMember,
@@ -556,7 +555,7 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> {
if let Some(_old) =
self.named_types.insert(name.clone(), parsed.clone())
{
- warn!("Found two types both named `{}`, only one will be used.", name);
+ tracing::warn!("Found two types both named `{}`, only one will be used.", name);
}
}
}
@@ -570,7 +569,7 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> {
}
}
Err(UnimplementedTypeKind(k)) if k != 0 => {
- warn!("Not parsing unimplemented type {}: kind {:x?}", ty, k);
+ tracing::warn!("Not parsing unimplemented type {}: kind {:x?}", ty, k);
}
Err(e) => {
self.log(|| format!("Could not parse type: {}: {}", ty, e));
@@ -921,7 +920,7 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> {
*base_offset,
base_type.width(),
));
- warn!(
+ tracing::warn!(
"Class `{}` uses virtual inheritance. Type information may be inaccurate.",
self.namespace_stack
.last()
@@ -933,7 +932,7 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> {
}
if bases.len() > 1 {
- warn!(
+ tracing::warn!(
"Class `{}` has multiple base classes. Type information may be inaccurate.",
self.namespace_stack
.last()
diff --git a/plugins/svd/Cargo.toml b/plugins/svd/Cargo.toml
index cd368585..e4cdc5d8 100644
--- a/plugins/svd/Cargo.toml
+++ b/plugins/svd/Cargo.toml
@@ -12,6 +12,7 @@ binaryninja.workspace = true
binaryninjacore-sys.workspace = true
svd-parser = { version = "0.14.8", features = ["expand"] }
serde_json = "1.0"
+tracing = "0.1"
[dev-dependencies]
insta = { version = "1.42", features = ["yaml"] }
diff --git a/plugins/svd/demo/Cargo.toml b/plugins/svd/demo/Cargo.toml
index 811f7d08..b7147574 100644
--- a/plugins/svd/demo/Cargo.toml
+++ b/plugins/svd/demo/Cargo.toml
@@ -13,6 +13,7 @@ binaryninja = { workspace = true, features = ["demo"]}
binaryninjacore-sys.workspace = true
svd-parser = { version = "0.14.8", features = ["expand"] }
serde_json = "1.0"
+tracing = "0.1"
[dev-dependencies]
insta = { version = "1.42", features = ["yaml"] }
diff --git a/plugins/svd/src/lib.rs b/plugins/svd/src/lib.rs
index 396a9447..6ada01f9 100644
--- a/plugins/svd/src/lib.rs
+++ b/plugins/svd/src/lib.rs
@@ -6,7 +6,6 @@ use crate::settings::LoadSettings;
use binaryninja::binary_view::{BinaryView, BinaryViewBase, BinaryViewExt};
use binaryninja::command::Command;
use binaryninja::interaction::{Form, FormInputField};
-use binaryninja::tracing;
use binaryninja::workflow::{activity, Activity, AnalysisContext, Workflow};
use std::path::PathBuf;
use svd_parser::ValidateLevel;
diff --git a/plugins/svd/src/mapper.rs b/plugins/svd/src/mapper.rs
index 2c09eb95..8f4abe47 100644
--- a/plugins/svd/src/mapper.rs
+++ b/plugins/svd/src/mapper.rs
@@ -6,7 +6,6 @@ use binaryninja::rc::Ref;
use binaryninja::section::{SectionBuilder, Semantics};
use binaryninja::segment::{SegmentBuilder, SegmentFlags};
use binaryninja::symbol::{SymbolBuilder, SymbolType};
-use binaryninja::tracing;
use binaryninja::types::{
BaseStructure, EnumerationBuilder, MemberAccess, MemberScope, NamedTypeReference,
NamedTypeReferenceClass, StructureBuilder, StructureMember, Type, TypeBuilder,
diff --git a/plugins/warp/Cargo.toml b/plugins/warp/Cargo.toml
index 79f7632f..3a623e0a 100644
--- a/plugins/warp/Cargo.toml
+++ b/plugins/warp/Cargo.toml
@@ -11,6 +11,7 @@ crate-type = ["lib", "cdylib"]
demo = []
[dependencies]
+tracing = "0.1"
binaryninja = { workspace = true, features = ["rayon"] }
binaryninjacore-sys.workspace = true
warp = { git = "https://github.com/Vector35/warp/", tag = "1.0.1" }
diff --git a/plugins/warp/demo/Cargo.toml b/plugins/warp/demo/Cargo.toml
index 50664483..662b4131 100644
--- a/plugins/warp/demo/Cargo.toml
+++ b/plugins/warp/demo/Cargo.toml
@@ -12,6 +12,7 @@ path = "../src/lib.rs"
demo = []
[dependencies]
+tracing = "0.1"
binaryninja = { workspace = true, features = ["rayon", "demo"] }
binaryninjacore-sys.workspace = true
warp = { git = "https://github.com/Vector35/warp/", tag = "1.0.0" }
diff --git a/plugins/warp/src/cache.rs b/plugins/warp/src/cache.rs
index 30c7487c..41aab423 100644
--- a/plugins/warp/src/cache.rs
+++ b/plugins/warp/src/cache.rs
@@ -11,7 +11,7 @@ use binaryninja::binary_view::{BinaryView, BinaryViewExt};
use binaryninja::function::Function as BNFunction;
use binaryninja::rc::Guard;
use binaryninja::rc::Ref as BNRef;
-use binaryninja::{tracing, ObjectDestructor};
+use binaryninja::ObjectDestructor;
use std::hash::{DefaultHasher, Hash, Hasher};
pub fn register_cache_destructor() {
diff --git a/plugins/warp/src/container/disk.rs b/plugins/warp/src/container/disk.rs
index 5e4a5613..6e296ea1 100644
--- a/plugins/warp/src/container/disk.rs
+++ b/plugins/warp/src/container/disk.rs
@@ -1,7 +1,6 @@
use crate::container::{
Container, ContainerError, ContainerResult, SourceId, SourcePath, SourceTag,
};
-use binaryninja::tracing;
use std::collections::{HashMap, HashSet};
use std::fmt::{Debug, Display, Formatter};
use std::hash::{Hash, Hasher};
diff --git a/plugins/warp/src/container/network.rs b/plugins/warp/src/container/network.rs
index 0908b103..0ba515f9 100644
--- a/plugins/warp/src/container/network.rs
+++ b/plugins/warp/src/container/network.rs
@@ -3,7 +3,6 @@ use crate::container::{
Container, ContainerError, ContainerResult, ContainerSearchQuery, ContainerSearchResponse,
SourceId, SourcePath, SourceTag,
};
-use binaryninja::tracing;
use directories::ProjectDirs;
use std::collections::{HashMap, HashSet};
use std::fmt::{Debug, Display, Formatter};
diff --git a/plugins/warp/src/container/network/client.rs b/plugins/warp/src/container/network/client.rs
index d3c94d1a..0b772dcc 100644
--- a/plugins/warp/src/container/network/client.rs
+++ b/plugins/warp/src/container/network/client.rs
@@ -5,7 +5,6 @@ use crate::container::{
};
use base64::Engine;
use binaryninja::download::DownloadProvider;
-use binaryninja::tracing;
use serde::Deserialize;
use serde_json::json;
use std::collections::HashMap;
diff --git a/plugins/warp/src/convert/types.rs b/plugins/warp/src/convert/types.rs
index 227df2ea..8421eb5e 100644
--- a/plugins/warp/src/convert/types.rs
+++ b/plugins/warp/src/convert/types.rs
@@ -6,7 +6,6 @@ use binaryninja::calling_convention::CoreCallingConvention as BNCallingConventio
use binaryninja::confidence::Conf as BNConf;
use binaryninja::confidence::MAX_CONFIDENCE;
use binaryninja::rc::Ref as BNRef;
-use binaryninja::tracing;
use binaryninja::types::BaseStructure as BNBaseStructure;
use binaryninja::types::EnumerationBuilder as BNEnumerationBuilder;
use binaryninja::types::FunctionParameter as BNFunctionParameter;
diff --git a/plugins/warp/src/plugin.rs b/plugins/warp/src/plugin.rs
index dec62c2f..cb527fff 100644
--- a/plugins/warp/src/plugin.rs
+++ b/plugins/warp/src/plugin.rs
@@ -12,8 +12,8 @@ use binaryninja::background_task::BackgroundTask;
use binaryninja::command::{
register_command, register_command_for_function, register_command_for_project,
};
+use binaryninja::is_ui_enabled;
use binaryninja::settings::{QueryOptions, Settings};
-use binaryninja::{is_ui_enabled, tracing};
mod commit;
mod create;
diff --git a/plugins/warp/src/plugin/commit.rs b/plugins/warp/src/plugin/commit.rs
index 56a78f9a..d98a356a 100644
--- a/plugins/warp/src/plugin/commit.rs
+++ b/plugins/warp/src/plugin/commit.rs
@@ -6,7 +6,6 @@ use crate::plugin::create::OpenFileField;
use binaryninja::binary_view::BinaryView;
use binaryninja::command::Command;
use binaryninja::interaction::{Form, FormInputField};
-use binaryninja::tracing;
use warp::chunk::ChunkKind;
use warp::WarpFile;
diff --git a/plugins/warp/src/plugin/create.rs b/plugins/warp/src/plugin/create.rs
index 04a3e9b6..0c6a2fd5 100644
--- a/plugins/warp/src/plugin/create.rs
+++ b/plugins/warp/src/plugin/create.rs
@@ -10,7 +10,6 @@ use binaryninja::command::Command;
use binaryninja::interaction::form::{Form, FormInputField};
use binaryninja::interaction::{MessageBoxButtonResult, MessageBoxButtonSet, MessageBoxIcon};
use binaryninja::rc::Ref;
-use binaryninja::tracing;
use std::path::PathBuf;
use std::thread;
use warp::chunk::Chunk;
diff --git a/plugins/warp/src/plugin/debug.rs b/plugins/warp/src/plugin/debug.rs
index 6db491e2..d220d329 100644
--- a/plugins/warp/src/plugin/debug.rs
+++ b/plugins/warp/src/plugin/debug.rs
@@ -3,7 +3,7 @@ use crate::{build_function, cache};
use binaryninja::binary_view::BinaryView;
use binaryninja::command::{Command, FunctionCommand};
use binaryninja::function::Function;
-use binaryninja::{tracing, ObjectDestructor};
+use binaryninja::ObjectDestructor;
pub struct DebugFunction;
diff --git a/plugins/warp/src/plugin/ffi/container.rs b/plugins/warp/src/plugin/ffi/container.rs
index 6c2551c1..2376ef10 100644
--- a/plugins/warp/src/plugin/ffi/container.rs
+++ b/plugins/warp/src/plugin/ffi/container.rs
@@ -10,7 +10,6 @@ use binaryninja::architecture::CoreArchitecture;
use binaryninja::binary_view::BinaryView;
use binaryninja::rc::Ref;
use binaryninja::string::BnString;
-use binaryninja::tracing;
use binaryninja::types::Type;
use binaryninjacore_sys::{BNArchitecture, BNBinaryView, BNType};
use std::ffi::{c_char, CStr};
diff --git a/plugins/warp/src/plugin/file.rs b/plugins/warp/src/plugin/file.rs
index 899e3f46..cd5fb626 100644
--- a/plugins/warp/src/plugin/file.rs
+++ b/plugins/warp/src/plugin/file.rs
@@ -1,7 +1,6 @@
use crate::report::ReportGenerator;
use binaryninja::binary_view::{BinaryView, BinaryViewExt};
use binaryninja::command::Command;
-use binaryninja::tracing;
pub struct ShowFileReport;
diff --git a/plugins/warp/src/plugin/function.rs b/plugins/warp/src/plugin/function.rs
index 3c0dc06c..36db7d55 100644
--- a/plugins/warp/src/plugin/function.rs
+++ b/plugins/warp/src/plugin/function.rs
@@ -10,7 +10,6 @@ use binaryninja::binary_view::{BinaryView, BinaryViewExt};
use binaryninja::command::{Command, FunctionCommand};
use binaryninja::function::{Function, FunctionUpdateType};
use binaryninja::rc::Guard;
-use binaryninja::tracing;
use rayon::iter::ParallelIterator;
use std::thread;
use warp::signature::function::FunctionGUID;
diff --git a/plugins/warp/src/plugin/load.rs b/plugins/warp/src/plugin/load.rs
index bd0e4838..2be473d8 100644
--- a/plugins/warp/src/plugin/load.rs
+++ b/plugins/warp/src/plugin/load.rs
@@ -10,7 +10,6 @@ use binaryninja::interaction::{
MessageBoxIcon,
};
use binaryninja::rc::Ref;
-use binaryninja::tracing;
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::atomic::AtomicBool;
diff --git a/plugins/warp/src/plugin/project.rs b/plugins/warp/src/plugin/project.rs
index 8862c00a..b6081c1f 100644
--- a/plugins/warp/src/plugin/project.rs
+++ b/plugins/warp/src/plugin/project.rs
@@ -9,7 +9,6 @@ use binaryninja::interaction::{Form, FormInputField};
use binaryninja::project::folder::ProjectFolder;
use binaryninja::project::Project;
use binaryninja::rc::Ref;
-use binaryninja::tracing;
use binaryninja::worker_thread::{set_worker_thread_count, worker_thread_count};
use rayon::ThreadPoolBuilder;
use regex::Regex;
diff --git a/plugins/warp/src/plugin/workflow.rs b/plugins/warp/src/plugin/workflow.rs
index a51c7399..1f4ef101 100644
--- a/plugins/warp/src/plugin/workflow.rs
+++ b/plugins/warp/src/plugin/workflow.rs
@@ -15,7 +15,6 @@ use binaryninja::command::Command;
use binaryninja::function::Function as BNFunction;
use binaryninja::rc::Ref as BNRef;
use binaryninja::settings::{QueryOptions, Settings};
-use binaryninja::tracing;
use binaryninja::workflow::{activity, Activity, AnalysisContext, Workflow, WorkflowBuilder};
use dashmap::DashSet;
use itertools::Itertools;
diff --git a/plugins/warp/src/processor.rs b/plugins/warp/src/processor.rs
index 3076ddca..e21a2efd 100644
--- a/plugins/warp/src/processor.rs
+++ b/plugins/warp/src/processor.rs
@@ -29,7 +29,6 @@ use binaryninja::rc::{Guard, Ref};
use crate::cache::cached_type_references;
use crate::convert::platform_to_target;
use crate::{build_function, INCLUDE_TAG_ICON, INCLUDE_TAG_NAME};
-use binaryninja::tracing;
use warp::chunk::{Chunk, ChunkKind, CompressionType};
use warp::r#type::chunk::TypeChunk;
use warp::signature::chunk::SignatureChunk;
diff --git a/plugins/workflow_objc/Cargo.toml b/plugins/workflow_objc/Cargo.toml
index da8ae2c6..948fc2de 100644
--- a/plugins/workflow_objc/Cargo.toml
+++ b/plugins/workflow_objc/Cargo.toml
@@ -17,3 +17,4 @@ dashmap = { version = "6.1", features = ["rayon"]}
once_cell = "1.20"
thiserror = "2.0"
bstr = "1.12"
+tracing = "0.1" \ No newline at end of file
diff --git a/plugins/workflow_objc/demo/Cargo.toml b/plugins/workflow_objc/demo/Cargo.toml
index bb7f41fa..449abee0 100644
--- a/plugins/workflow_objc/demo/Cargo.toml
+++ b/plugins/workflow_objc/demo/Cargo.toml
@@ -14,8 +14,8 @@ demo = []
[dependencies]
binaryninja = { workspace = true, features = ["demo"] }
binaryninjacore-sys.workspace = true
-log = "0.4"
dashmap = { version = "6.1", features = ["rayon"]}
once_cell = "1.20"
thiserror = "2.0"
bstr = "1.12"
+tracing = "0.1" \ No newline at end of file
diff --git a/plugins/workflow_objc/src/activities/objc_msg_send_calls.rs b/plugins/workflow_objc/src/activities/objc_msg_send_calls.rs
index 86024047..3a772e79 100644
--- a/plugins/workflow_objc/src/activities/objc_msg_send_calls.rs
+++ b/plugins/workflow_objc/src/activities/objc_msg_send_calls.rs
@@ -7,7 +7,6 @@ use binaryninja::{
instruction::{InstructionHandler as _, LowLevelILInstruction, LowLevelILInstructionKind},
operation::{CallSsa, Operation},
},
- tracing,
variable::PossibleValueSet,
workflow::AnalysisContext,
};
diff --git a/plugins/workflow_objc/src/activities/objc_msg_send_calls/rewrite_to_direct_call.rs b/plugins/workflow_objc/src/activities/objc_msg_send_calls/rewrite_to_direct_call.rs
index 56c2aa52..02f41de8 100644
--- a/plugins/workflow_objc/src/activities/objc_msg_send_calls/rewrite_to_direct_call.rs
+++ b/plugins/workflow_objc/src/activities/objc_msg_send_calls/rewrite_to_direct_call.rs
@@ -4,7 +4,6 @@ use binaryninja::{
function::{LowLevelILFunction, Mutable, NonSSA, SSA},
instruction::{InstructionHandler as _, LowLevelILInstruction, LowLevelILInstructionKind},
},
- tracing,
};
use super::MessageSendType;
diff --git a/plugins/workflow_objc/src/activities/remove_memory_management.rs b/plugins/workflow_objc/src/activities/remove_memory_management.rs
index fdd76650..cd613ee2 100644
--- a/plugins/workflow_objc/src/activities/remove_memory_management.rs
+++ b/plugins/workflow_objc/src/activities/remove_memory_management.rs
@@ -11,7 +11,6 @@ use binaryninja::{
lifting::LowLevelILLabel,
LowLevelILRegisterKind,
},
- tracing,
variable::PossibleValueSet,
workflow::AnalysisContext,
};
diff --git a/plugins/workflow_objc/src/activities/super_init.rs b/plugins/workflow_objc/src/activities/super_init.rs
index 1cdf8825..68c6d3ee 100644
--- a/plugins/workflow_objc/src/activities/super_init.rs
+++ b/plugins/workflow_objc/src/activities/super_init.rs
@@ -10,7 +10,6 @@ use binaryninja::{
MediumLevelILFunction, MediumLevelILLiftedInstruction, MediumLevelILLiftedInstructionKind,
},
rc::Ref,
- tracing,
types::Type,
variable::{RegisterValueType, SSAVariable},
workflow::AnalysisContext,
diff --git a/plugins/workflow_objc/src/lib.rs b/plugins/workflow_objc/src/lib.rs
index 5b41b6d0..483751ae 100644
--- a/plugins/workflow_objc/src/lib.rs
+++ b/plugins/workflow_objc/src/lib.rs
@@ -1,4 +1,4 @@
-use binaryninja::{add_optional_plugin_dependency, settings::Settings, tracing};
+use binaryninja::{add_optional_plugin_dependency, settings::Settings};
mod activities;
mod error;
diff --git a/plugins/workflow_objc/src/metadata/global_state.rs b/plugins/workflow_objc/src/metadata/global_state.rs
index c6682a5f..db29af49 100644
--- a/plugins/workflow_objc/src/metadata/global_state.rs
+++ b/plugins/workflow_objc/src/metadata/global_state.rs
@@ -5,7 +5,7 @@ use binaryninja::{
metadata::Metadata,
rc::Ref,
settings::{QueryOptions, Settings},
- tracing, ObjectDestructor,
+ ObjectDestructor,
};
use dashmap::DashMap;
use once_cell::sync::Lazy;
diff --git a/plugins/workflow_objc/src/workflow.rs b/plugins/workflow_objc/src/workflow.rs
index 13e3a71e..fdda1d45 100644
--- a/plugins/workflow_objc/src/workflow.rs
+++ b/plugins/workflow_objc/src/workflow.rs
@@ -1,4 +1,3 @@
-use binaryninja::tracing;
use binaryninja::workflow::{activity, Activity, AnalysisContext, Workflow};
use crate::{activities, error::WorkflowRegistrationError};