Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IRDB SDK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
IRDB SDK
Commits
05b2a463
Commit
05b2a463
authored
6 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
adding irdb-deep to irdb-sdk
parent
cd29ed89
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/inc-deep/deep.hpp
+39
-0
39 additions, 0 deletions
include/inc-deep/deep.hpp
include/inc-util/register.hpp
+45
-0
45 additions, 0 deletions
include/inc-util/register.hpp
include/irdb-deep
+9
-0
9 additions, 0 deletions
include/irdb-deep
include/irdb-util
+3
-0
3 additions, 0 deletions
include/irdb-util
with
96 additions
and
0 deletions
include/inc-deep/deep.hpp
0 → 100644
+
39
−
0
View file @
05b2a463
#include
<irdb-core>
#include
<irdb-util>
#include
<map>
#include
<set>
#include
<memory>
namespace
IRDB_SDK
{
using
namespace
std
;
using
AnalysisEngine_t
=
enum
AnalysisEngine
{
aeSTARS
,
aeMoon
,
aeRida
};
using
RegisterIDSet_t
=
set
<
RegisterID_t
>
;
using
DeadRegisterMap_t
=
map
<
Instruction_t
*
,
RegisterIDSet_t
*>
;
using
StaticGlobalSet_t
=
InstructionSet_t
;
using
RangeSentinalSet_t
=
InstructionSet_t
;
class
DeepAnalysis_t
{
protected:
DeepAnalysis_t
()
{}
DeepAnalysis_t
(
const
DeepAnalysis_t
&
copy
)
=
delete
;
public
:
unique_ptr
<
DeadRegisterMap_t
>
getDeadRegisters
()
const
=
0
;
unique_ptr
<
StaticGlobalSet_t
>
getStaticGlobalRanges
()
const
=
0
;
unique_ptr
<
SentinalSet_t
>
getRangeSentials
()
const
=
0
;
// factories
unique_ptr
<
DeepAnalysis_t
>
factory
(
FileIR_t
*
firp
,
const
AnalysisEngine_t
&
ae
=
aeSTARS
,
vector
<
string
>
options
=
{});
};
}
This diff is collapsed.
Click to expand it.
include/inc-util/register.hpp
0 → 100644
+
45
−
0
View file @
05b2a463
#include
<string>
namespace
IRDB_SDK
{
using
namespace
std
;
using
RegisterID_t
=
enum
RegisterID
{
/* an register that's not valid on any machine, equiv. to a nullptr of registers */
rn_UNKNOWN
,
/* x86 32 and 64 */
rn_EFLAGS
,
/* x86 IP register names */
rn_IP
,
rn_EIP
=
rn_IP
,
rn_RIP
=
rn_IP
,
/* x86 general purpose registers */
rn_EAX
,
rn_EBX
,
rn_ECX
,
rn_EDX
,
rn_ESI
,
rn_EDI
,
rn_EBP
,
rn_ESP
,
rn_R8D
,
rn_R9D
,
rn_R10D
,
rn_R11D
,
rn_R12D
,
rn_R13D
,
rn_R14D
,
rn_R15D
,
rn_RAX
,
rn_RBX
,
rn_RCX
,
rn_RDX
,
rn_RBP
,
rn_RSP
,
rn_RSI
,
rn_RDI
,
rn_R8
,
rn_R9
,
rn_R10
,
rn_R11
,
rn_R12
,
rn_R13
,
rn_R14
,
rn_R15
,
rn_AX
,
rn_BX
,
rn_CX
,
rn_DX
,
rn_BP
,
rn_SP
,
rn_SI
,
rn_DI
,
rn_R8W
,
rn_R9W
,
rn_R10W
,
rn_R11W
,
rn_R12W
,
rn_R13W
,
rn_R14W
,
rn_R15W
,
rn_AH
,
rn_BH
,
rn_CH
,
rn_DH
,
rn_SIH
,
rn_DIH
,
rn_BPH
,
rn_SPH
,
rn_AL
,
rn_BL
,
rn_CL
,
rn_DL
,
rn_SIL
,
rn_DIL
,
rn_BPL
,
rn_SPL
,
rn_R8B
,
rn_R9B
,
rn_R10B
,
rn_R11B
,
rn_R12B
,
rn_R13B
,
rn_R14B
,
rn_R15B
,
/* other x86 registers here (e.g., fp, xmm, etc.), eventually */
/* other archs support added here, eventually */
};
RegisterID_t
strToRegister
(
const
string
&
p_regStr
);
RegisterID_t
strToRegister
(
const
char
*
p_regStr
);
bool
isValidRegister
(
const
RegisterID_t
p_reg
);
bool
is64bitRegister
(
const
RegisterID_t
p_reg
);
bool
is32bitRegister
(
const
RegisterID_t
p_reg
);
bool
is16bitRegister
(
const
RegisterID_t
p_reg
);
bool
is8bitRegister
(
const
RegisterID_t
p_reg
);
int
getRegisterBitWidth
(
const
RegisterID_t
p_reg
);
string
registerToString
(
const
RegisterID_t
p_reg
);
RegisterID_t
convertRegisterTo64bit
(
const
RegisterID_t
p_reg
);
RegisterID_t
convertRegisterTo32bit
(
const
RegisterID_t
p_reg
);
RegisterID_t
convertRegisterTo16bit
(
const
RegisterID_t
p_reg
);
}
This diff is collapsed.
Click to expand it.
include/irdb-deep
0 → 100644
+
9
−
0
View file @
05b2a463
#ifndef IRDB_SDK_deep
#define IRDB_SDK_deep
#include <inc-deep/deep.hpp>
#endif
This diff is collapsed.
Click to expand it.
include/irdb-util
+
3
−
0
View file @
05b2a463
...
...
@@ -19,6 +19,8 @@
*/
#ifndef IRDB_SDK_util
#include <irdb-core>
#define IRDB_SDK_util
/* Building a CFG depends on core functionality */
...
...
@@ -30,5 +32,6 @@
#include <inc-util/IBT_Provenance.hpp>
#include <inc-util/params.hpp>
#include <inc-util/utils.hpp>
#include <inc-util/register.hpp>
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment