Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
R
RatelApi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ratel
RatelApi
Commits
f7943412
Commit
f7943412
authored
Dec 21, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新方法签名
parent
ee4c56ae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
NativeHelper.java
src/main/java/com/virjar/ratel/api/NativeHelper.java
+21
-11
No files found.
src/main/java/com/virjar/ratel/api/NativeHelper.java
View file @
f7943412
...
@@ -6,21 +6,31 @@ import java.lang.reflect.Method;
...
@@ -6,21 +6,31 @@ import java.lang.reflect.Method;
* native分析相关的帮助类
* native分析相关的帮助类
*/
*/
public
interface
NativeHelper
{
public
interface
NativeHelper
{
public
class
NativePrtInfo
{
/**
/**
* 查询一个native方法的的native的函数指针
* native的函数指针
*
* @param method native方法
* @return 指针
*/
*/
long
queryNativeMethodPtr
(
Method
method
);
public
long
ptr
;
/**
* native函数相对于so的偏移量
*/
public
long
offset
;
/**
/**
* 尝试计算一个native方法的所在so的文件地址
* native函数对应的so文件地址
*/
public
String
soPath
;
}
/**
* 查询native方法指针在的so相关信息,包括函数指针、函数对应so的偏移量、so对应的文件地址。这些数据可能获取包(时机不正确、内存匿名映射等)
*
*
* @param method
native方法
* @param method
method对象,必须是native的
* @return
so地址,如果被特殊处理过,或者是内存释放的so。那么这里可能没有地址
* @return
NativePrtInfo结构体
*/
*/
String
queryNativeSoPath
(
Method
method
);
NativePrtInfo
queryMethodNativeInfo
(
Method
method
);
/**
/**
* 尝试将一个native方法的so文件dump下来
* 尝试将一个native方法的so文件dump下来
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment