File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020@dataclass
2121class RustStringSlice :
22+ """
23+ Class to work with the string slice type in Rust, &str
24+ """
25+
2226 address : int
2327 length : int
2428 data : bytes
@@ -42,15 +46,15 @@ def create_binary_ninja_type(cls, bv: BinaryView):
4246 )
4347
4448 bv .define_user_type (
45- name = "RustStringSlice " ,
49+ name = "&str " ,
4650 type_obj = rust_string_slice_bn_type_obj ,
4751 )
48- logger .log_info (f"Defined new RustStringSlice type" )
52+ logger .log_info (f"Defined new type, `&str`, for Rust string slices " )
4953
5054 @classmethod
5155 def create_binary_ninja_instance (cls , bv : BinaryView , location : int , name : str ):
52- bv .define_user_data_var (addr = location , var_type = "RustStringSlice " , name = name )
53- logger .log_info (f"Defined new RustStringSlice at { location :#x} " )
56+ bv .define_user_data_var (addr = location , var_type = "`&str` " , name = name )
57+ logger .log_info (f"Defined new `&str` at { location :#x} " )
5458
5559
5660class RecoverStringFromReadOnlyDataTask (BackgroundTaskThread ):
You can’t perform that action at this time.
0 commit comments