Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SandHook
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
Administrator
SandHook
Commits
aebe7002
Commit
aebe7002
authored
May 06, 2019
by
swift_gan
Committed by
swift_gan
May 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add inst type
parent
2c5124f5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
5 deletions
+23
-5
inst_arm64.h
nativehook/src/main/cpp/archs/arm64/inst_arm64.h
+11
-3
instruction.h
nativehook/src/main/cpp/asm/instruction.h
+8
-0
base.h
nativehook/src/main/cpp/includes/base.h
+4
-2
No files found.
nativehook/src/main/cpp/archs/arm64/inst_arm64.h
View file @
aebe7002
...
...
@@ -17,14 +17,22 @@ namespace SandHook {
class
InstructionA64
:
public
Instruction
<
InstStruct
>
{
public
:
InstStruct
mask
(
InstStruct
raw
)
{
inline
InstStruct
mask
(
InstStruct
raw
)
{
return
raw
&
(
InstStruct
)
*
this
;
}
bool
IsPCRelAddressing
()
{
inline
bool
IsPCRelAddressing
()
{
return
mask
(
PCRelAddressingFMask
)
==
PCRelAddressingFixed
;
}
inline
InstType
instType
()
override
{
return
A64
;
}
inline
Arch
arch
()
override
{
return
arm64
;
}
int
getImmBranch
()
{
//TODO
return
0
;
...
...
@@ -46,7 +54,7 @@ namespace SandHook {
class
A64_ADR_ADRP
:
public
A64_INST_PC_REL
{
public
:
bool
isADRP
()
{
inline
bool
isADRP
()
{
return
get
().
op
==
1
;
}
...
...
nativehook/src/main/cpp/asm/instruction.h
View file @
aebe7002
...
...
@@ -27,6 +27,14 @@ namespace SandHook {
return
(
void
*
)
this
;
}
virtual
InstType
instType
()
{
return
unkownInst
;
}
virtual
Arch
arch
()
{
return
unkownArch
;
}
bool
pcRelate
()
{
return
false
;
}
...
...
nativehook/src/main/cpp/includes/base.h
View file @
aebe7002
...
...
@@ -26,14 +26,16 @@ const ADDR PAGE_SIZE = 2 << PAGE_OFFSET;
enum
Arch
{
arm32
,
arm64
arm64
,
unkownArch
};
enum
InstType
{
A32
,
thumb16
,
thumb32
,
A64
A64
,
unkownInst
};
template
<
int
SizeInBits
>
...
...
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