Function, Segment, Type enhancements#39
Conversation
IDB::function_containing_address(ea) IDB::set_name(ea, str) IDB::set_function_name(ea, str) IDB::types() IDB::parse_types_from_header(path) IDB::get_type_at_address(ea) Function::name() Function::set_noret(bool) Function::set_name(strings) Function::get_type() Function::set_type() Segment::set_permissions() New Type class for convience functions on tinfo Type::name() Type::apply_to_address()
|
Thank you for the PR and sorry for the delay in providing review. Before we merge this I'd like to figure out a reasonable way to model mutation on the IDB in a way that works nicely with Rust's ergonomics, e.g., having let mut idb = ...;
let mut f1 = idb.function_at(0x1000u64);
let f2 = idb.function_at(0x1000u64);
// f1 and f2 are the same
f1.set_name("..."); // f2 is also "mutated"Ideally, I'd like something like this: let mut idb = ...;
let mut f1 = idb.function_at_mut(0x1000u64);
let f2 = idb.function_at(0x1000u64); // not possible due to mutable ref via f1
f1.set_name("...");I have a sketch of a solution, which should be ready "soon", after that we'll be in a position to merge the functionality you've added. Thanks again for your contribution! |
|
That's a very good point. I haven't spent a lot of time wrapping C/C++ apis in Rust. That mutability issue is pretty major oversight by me. I'll wait to do anything until your sketch is ready! |
IDB::function_containing_address(ea)
IDB::set_name(ea, str)
IDB::set_function_name(ea, str)
IDB::types()
IDB::parse_types_from_header(path)
IDB::get_type_at_address(ea)
Function::name()
Function::set_noret(bool)
Function::set_name(strings)
Function::get_type()
Function::set_type()
Segment::set_permissions()
New Type class for convience functions on tinfo
Type::name()
Type::apply_to_address()