diff options
| author | KyleMiles <krm504@nyu.edu> | 2022-10-07 15:55:43 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2022-10-09 18:08:24 -0400 |
| commit | 1d21f2de35633113c38692a4fcb7e0481c96fd08 (patch) | |
| tree | 0d30c740c9279940fa07d04f380c554a02b0632b /rust | |
| parent | ed4dbf7bad554078139dcde3b437527078dc42ec (diff) | |
Remove default load settings; Move settings `analysis.debugInfoInternal` and `loader.debugInfoExternal` to `analysis.debugInfo.internal` and `analysis.debugInfo.external`
Diffstat (limited to 'rust')
| -rw-r--r-- | rust/src/binaryview.rs | 28 | ||||
| -rw-r--r-- | rust/src/debuginfo.rs | 2 |
2 files changed, 4 insertions, 26 deletions
diff --git a/rust/src/binaryview.rs b/rust/src/binaryview.rs index bf9aea9b..b0379aae 100644 --- a/rust/src/binaryview.rs +++ b/rust/src/binaryview.rs @@ -690,28 +690,6 @@ pub trait BinaryViewExt: BinaryViewBase { }; } - fn get_default_load_settings<S: BnStrCompatible>( - &self, - view_type_name: S, - settings: &Settings, - ) -> Result<Ref<Settings>> { - let view_type_name = view_type_name.into_bytes_with_nul(); - - let settings_handle = unsafe { - BNBinaryViewGetDefaultLoadSettings( - self.as_ref().handle, - view_type_name.as_ref().as_ptr() as *mut _, - settings.handle, - ) - }; - - if settings_handle.is_null() { - Err(()) - } else { - Ok(unsafe { Settings::from_raw(settings_handle) }) - } - } - /// Creates a new [TagType] and adds it to the view. /// /// # Arguments @@ -934,7 +912,7 @@ impl BinaryView { let file = filename.into_bytes_with_nul(); let handle = unsafe { - BNCreateBinaryDataViewFromFilename(meta.handle, file.as_ref().as_ptr() as *mut _, true) + BNCreateBinaryDataViewFromFilename(meta.handle, file.as_ref().as_ptr() as *mut _) }; if handle.is_null() { @@ -946,7 +924,7 @@ impl BinaryView { pub fn from_accessor(meta: &FileMetadata, file: &mut FileAccessor) -> Result<Ref<Self>> { let handle = unsafe { - BNCreateBinaryDataViewFromFile(meta.handle, &mut file.api_object as *mut _, true) + BNCreateBinaryDataViewFromFile(meta.handle, &mut file.api_object as *mut _) }; if handle.is_null() { @@ -958,7 +936,7 @@ impl BinaryView { pub fn from_data(meta: &FileMetadata, data: &[u8]) -> Result<Ref<Self>> { let handle = unsafe { - BNCreateBinaryDataViewFromData(meta.handle, data.as_ptr() as *mut _, data.len(), true) + BNCreateBinaryDataViewFromData(meta.handle, data.as_ptr() as *mut _, data.len()) }; if handle.is_null() { diff --git a/rust/src/debuginfo.rs b/rust/src/debuginfo.rs index d4c8b357..c3c94261 100644 --- a/rust/src/debuginfo.rs +++ b/rust/src/debuginfo.rs @@ -52,7 +52,7 @@ //! } //! ``` //! -//! `DebugInfo` will then be automatically applied to binary views that contain debug information (via the load setting `loader.debugInfoInternal`), binary views that provide valid external debug info files (`loader.debugInfoExternal`), or manually fetched/applied as below: +//! `DebugInfo` will then be automatically applied to binary views that contain debug information (via the setting `analysis.debugInfo.internal`), binary views that provide valid external debug info files (`analysis.debugInfo.external`), or manually fetched/applied as below: //! ``` //! let valid_parsers = DebugInfoParser::parsers_for_view(bv); //! let parser = valid_parsers[0]; |
