@@ -48,10 +48,11 @@ use crate::variable::{
4848 StackVariableReference , Variable ,
4949} ;
5050use crate :: workflow:: Workflow ;
51+ use std:: ffi:: CStr ;
5152use std:: fmt:: { Debug , Formatter } ;
5253use std:: ptr:: NonNull ;
5354use std:: time:: Duration ;
54- use std:: { ffi :: c_char , hash:: Hash , ops:: Range } ;
55+ use std:: { hash:: Hash , ops:: Range } ;
5556
5657/// Used to describe a location within a [`Function`].
5758#[ derive( Debug , Copy , Clone , PartialEq , Eq , Hash ) ]
@@ -2213,17 +2214,17 @@ impl Function {
22132214 ///
22142215 /// * `name` - Name of the debug report
22152216 pub fn request_debug_report ( & self , name : & str ) {
2216- const DEBUG_REPORT_ALIAS : & [ ( & str , & str ) ] = & [
2217- ( "stack" , "stack_adjust_graph\x00 " ) ,
2218- ( "mlil" , "mlil_translator\x00 " ) ,
2219- ( "hlil" , "high_level_il\x00 " ) ,
2217+ const DEBUG_REPORT_ALIAS : & [ ( & str , & CStr ) ] = & [
2218+ ( "stack" , c "stack_adjust_graph") ,
2219+ ( "mlil" , c "mlil_translator") ,
2220+ ( "hlil" , c "high_level_il") ,
22202221 ] ;
22212222
22222223 if let Some ( alias_idx) = DEBUG_REPORT_ALIAS
22232224 . iter ( )
22242225 . position ( |( alias, _value) | * alias == name)
22252226 {
2226- let name = DEBUG_REPORT_ALIAS [ alias_idx] . 1 . as_ptr ( ) as * const c_char ;
2227+ let name = DEBUG_REPORT_ALIAS [ alias_idx] . 1 . as_ptr ( ) ;
22272228 unsafe { BNRequestFunctionDebugReport ( self . handle , name) }
22282229 } else {
22292230 let name = std:: ffi:: CString :: new ( name. to_string ( ) ) . unwrap ( ) ;
0 commit comments