Skip to content

Commit

Permalink
CR: s/from_gum/obtain/
Browse files Browse the repository at this point in the history
  • Loading branch information
elazarl committed Oct 29, 2024
1 parent 147b799 commit 9c8507e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/gum/debug_symbol/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
static CELL: OnceLock<Gum> = OnceLock::new();
let gum = CELL.get_or_init(|| Gum::obtain());

let module = Module::from_gum(gum);
let module = Module::obtain(gum);
let symbol = module.find_export_by_name(None, "mmap").unwrap();
let symbol_details = DebugSymbol::from_address(symbol).unwrap();
println!(
Expand Down
2 changes: 1 addition & 1 deletion examples/gum/hook_instruction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn init() {
static CELL: OnceLock<Gum> = OnceLock::new();
let gum = CELL.get_or_init(|| Gum::obtain());
let mut interceptor = Interceptor::obtain(gum);
let module = Module::from_gum(gum);
let module = Module::obtain(gum);
let open = module.find_export_by_name(None, "open").unwrap();
let mut listener = OpenProbeListener;
interceptor.attach_instruction(open, &mut listener).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples/gum/hook_open/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ unsafe extern "C" fn open_detour(name: *const c_char, flags: c_int) -> c_int {
fn init() {
static CELL: OnceLock<Gum> = OnceLock::new();
let gum = CELL.get_or_init(|| Gum::obtain());
let module = Module::from_gum(gum);
let module = Module::obtain(gum);
let mut interceptor = Interceptor::obtain(gum);
let open = module.find_export_by_name(None, "open").unwrap();
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion examples/gum/open/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" fn example_agent_main(_user_data: *const c_void, resident: *mut c_int
let mut interceptor = Interceptor::obtain(gum);
let mut listener = OpenListener {};

let module = Module::from_gum(gum);
let module = Module::obtain(gum);
let modules = module.enumerate_modules();
for module in modules {
println!(
Expand Down
2 changes: 1 addition & 1 deletion frida-gum/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub struct Module {
}

impl Module {
pub fn from_gum(gum: &'static Gum) -> Module {
pub fn obtain(gum: &'static Gum) -> Module {
Module { _gum: gum }
}

Expand Down

0 comments on commit 9c8507e

Please sign in to comment.