Skip to content

Commit b249e03

Browse files
修复bug
1 parent 96eec1c commit b249e03

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

app/src/main/cpp/il2cpp_trace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void hook_all_fun(){
110110
for (auto it = fun_name_dict.begin(); it != fun_name_dict.end(); ++it) {
111111
unsigned long fun_offset = it->first;
112112
std::string fun_name = it->second;
113-
int set_uprobe_ret = set_fun_info2(fun_offset,(char*)fun_name.c_str());
113+
int set_uprobe_ret = set_fun_info(fun_offset,(char*)fun_name.c_str());
114114
if(set_uprobe_ret!=SET_TRACE_SUCCESS){
115115
LOGE("set uprobe in fun_name:%s,fun_offset:0x%llx",fun_name.c_str(),fun_offset);
116116
}

app/src/main/cpp/uprobe_trace_user.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ int set_fun_info(unsigned long fun_offset,char *fun_name){
3737
return ret;
3838
}
3939

40-
//set_fun_info函数设置成功但失效的情况下再用这个函数
41-
//,最好在一个程序内不要与set_fun_info函数同时使用
42-
int set_fun_info2(unsigned long fun_offset,char *fun_name){
43-
int ret = syscall(__NR_mincore,fun_offset-0x1000,TRACE_FLAG+SET_FUN_INFO,fun_name);
44-
return ret;
45-
}
46-
4740
int clear_all_uprobes(){
4841
int ret = syscall(__NR_mincore,0,TRACE_FLAG+CLEAR_UPROBE,"");
4942
return ret;

0 commit comments

Comments
 (0)