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
60554bc6
Commit
60554bc6
authored
Feb 11, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inst check
parent
0dbe3b9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
inst.h
hooklib/src/main/cpp/includes/inst.h
+56
-0
No files found.
hooklib/src/main/cpp/includes/inst.h
0 → 100644
View file @
60554bc6
//
// Created by swift on 2019/2/3.
//
#ifndef SANDHOOK_INST_VISTOR_H
#define SANDHOOK_INST_VISTOR_H
#include <cstdint>
#include "arch.h"
namespace
SandHook
{
union
Arm32Code
{
uint32_t
code
;
struct
{
uint32_t
cond
:
4
;
uint32_t
empty
:
2
;
uint32_t
opcode
:
4
;
uint32_t
s
:
1
;
uint32_t
rn
:
4
;
uint32_t
rd
:
4
;
uint32_t
operand2
:
12
;
}
units
;
};
enum
InstArch
{
ARM32
,
Thumb
,
Thumb2
,
AARCH64
,
X86
,
X64
};
enum
InstType
{
};
class
Inst
{
public
:
uint32_t
opcode
;
InstArch
arch
;
InstType
type
;
virtual
int
instLen
()
const
=
0
;
};
class
InstVisitor
{
public
:
virtual
bool
visit
(
Inst
inst
,
Size
offset
,
Size
length
)
const
=
0
;
};
}
#endif //SANDHOOK_INST_VISTOR_H
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