diff options
| author | Mason Reed <mason@vector35.com> | 2025-01-27 19:06:18 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-01-27 19:07:19 -0500 |
| commit | b3f2ef82dd8fdc20887c09532c328356cf3552b6 (patch) | |
| tree | 35d33f72d16f5ec8f084b1785dd399c2a5cdd7a0 /rust/src/architecture.rs | |
| parent | 4551d1f3f4c99d72437d5908fe2aaa0ac850bb1f (diff) | |
Update some rust impl Debug
If a function had a tag it would recurse cyclicly
Diffstat (limited to 'rust/src/architecture.rs')
| -rw-r--r-- | rust/src/architecture.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs index 09808b39..857a6e88 100644 --- a/rust/src/architecture.rs +++ b/rust/src/architecture.rs @@ -1377,7 +1377,7 @@ impl Drop for CoreArchitectureList { } } -#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] +#[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct CoreArchitecture { pub(crate) handle: *mut BNArchitecture, } @@ -1895,6 +1895,20 @@ impl Architecture for CoreArchitecture { } } +impl Debug for CoreArchitecture { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("CoreArchitecture") + .field("name", &self.name()) + .field("endianness", &self.endianness()) + .field("address_size", &self.address_size()) + .field("default_integer_size", &self.default_integer_size()) + .field("instruction_alignment", &self.instruction_alignment()) + .field("max_instr_len", &self.max_instr_len()) + .field("opcode_display_len", &self.opcode_display_len()) + .finish() + } +} + macro_rules! cc_func { ($get_name:ident, $get_api:ident, $set_name:ident, $set_api:ident) => { fn $get_name(&self) -> Option<Ref<CoreCallingConvention>> { |
