@@ -193,12 +193,12 @@ const MAYBE_LOG_CODE: [u8; 60] = [
193
193
] ;
194
194
195
195
#[ cfg( target_arch = "aarch64" ) ]
196
- fn get_pc ( context : & CpuContext ) -> usize {
196
+ fn pc ( context : & CpuContext ) -> usize {
197
197
context. pc ( ) as usize
198
198
}
199
199
200
200
#[ cfg( target_arch = "x86_64" ) ]
201
- fn get_pc ( context : & CpuContext ) -> usize {
201
+ fn pc ( context : & CpuContext ) -> usize {
202
202
context. rip ( ) as usize
203
203
}
204
204
@@ -284,10 +284,10 @@ impl<'a> FridaInstrumentationHelper<'a> {
284
284
let real_address = match helper
285
285
. asan_runtime
286
286
. borrow ( )
287
- . real_address_for_stalked ( get_pc ( & context) )
287
+ . real_address_for_stalked ( pc ( & context) )
288
288
{
289
289
Some ( address) => * address,
290
- None => get_pc ( & context) ,
290
+ None => pc ( & context) ,
291
291
} ;
292
292
//let (range, (id, name)) = helper.ranges.get_key_value(&real_address).unwrap();
293
293
//println!("{}:0x{:016x}", name, real_address - range.start);
@@ -341,7 +341,7 @@ impl<'a> FridaInstrumentationHelper<'a> {
341
341
}
342
342
#[ cfg( target_arch = "aarch64" ) ]
343
343
#[ inline]
344
- fn get_writer_register ( & self , reg : capstone:: RegId ) -> Aarch64Register {
344
+ fn writer_register ( & self , reg : capstone:: RegId ) -> Aarch64Register {
345
345
let regint: u16 = reg. 0 ;
346
346
Aarch64Register :: from_u32 ( regint as u32 ) . unwrap ( )
347
347
}
@@ -361,9 +361,9 @@ impl<'a> FridaInstrumentationHelper<'a> {
361
361
) {
362
362
let writer = output. writer ( ) ;
363
363
364
- let basereg = self . get_writer_register ( basereg) ;
364
+ let basereg = self . writer_register ( basereg) ;
365
365
let indexreg = if indexreg. 0 != 0 {
366
- Some ( self . get_writer_register ( indexreg) )
366
+ Some ( self . writer_register ( indexreg) )
367
367
} else {
368
368
None
369
369
} ;
@@ -556,7 +556,7 @@ impl<'a> FridaInstrumentationHelper<'a> {
556
556
557
557
#[ cfg( target_arch = "aarch64" ) ]
558
558
#[ inline]
559
- fn get_instruction_width ( & self , instr : & Insn , operands : & Vec < arch:: ArchOperand > ) -> u32 {
559
+ fn instruction_width ( & self , instr : & Insn , operands : & Vec < arch:: ArchOperand > ) -> u32 {
560
560
use capstone:: arch:: arm64:: Arm64Insn as I ;
561
561
use capstone:: arch:: arm64:: Arm64Reg as R ;
562
562
use capstone:: arch:: arm64:: Arm64Vas as V ;
@@ -662,7 +662,7 @@ impl<'a> FridaInstrumentationHelper<'a> {
662
662
opmem. base ( ) ,
663
663
opmem. index ( ) ,
664
664
opmem. disp ( ) ,
665
- self . get_instruction_width ( instr, & operands) ,
665
+ self . instruction_width ( instr, & operands) ,
666
666
arm64operand. shift ,
667
667
arm64operand. ext ,
668
668
) ) ;
0 commit comments