Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CFI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
CFI
Commits
46d1a74b
Commit
46d1a74b
authored
6 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
refactored to deal with options better
parent
71451379
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Xeon_relocs.cpp
+4
-3
4 additions, 3 deletions
Xeon_relocs.cpp
Xeon_relocs.hpp
+5
-3
5 additions, 3 deletions
Xeon_relocs.hpp
with
9 additions
and
6 deletions
Xeon_relocs.cpp
+
4
−
3
View file @
46d1a74b
...
...
@@ -192,12 +192,13 @@ void Xeon_relocs::UpdateAddrRanges()
}
}
#if 0
ZiprOptionsNamespace_t *Xeon_relocs::registerOptions(Zipr_SDK::ZiprOptionsNamespace_t *global)
{
global->addOption(&m_verbose);
return NULL;
}
#endif
bool
Xeon_relocs
::
willPluginPlop
(
IRDB_SDK
::
Instruction_t
*
insn
)
...
...
@@ -210,7 +211,7 @@ bool Xeon_relocs::willPluginPlop(IRDB_SDK::Instruction_t* insn)
if
(
FindExeNonceRelocation
(
insn
))
will_plop
=
true
;
if
(
m_verbose
)
if
(
*
m_verbose
)
{
cout
<<
"Xeon_relocs::WillPluginPlop:WillPlop="
<<
std
::
boolalpha
<<
will_plop
<<
" for "
...
...
@@ -267,7 +268,7 @@ RangeAddress_t Xeon_relocs::plopDollopEntry(Zipr_SDK::DollopEntry_t *de,
ret
+=
instruction_size
;
}
if
(
m_verbose
)
if
(
*
m_verbose
)
{
cout
<<
"Xeon_relocs::Plopping Instruction : "
<<
hex
<<
de
->
getInstruction
()
->
getBaseID
()
<<
":"
<<
de
->
getInstruction
()
->
getDisassembly
()
<<
endl
;
...
...
This diff is collapsed.
Click to expand it.
Xeon_relocs.hpp
+
5
−
3
View file @
46d1a74b
...
...
@@ -21,7 +21,6 @@ class Xeon_relocs : public ZiprPluginInterface_t
m_memory_space
(
p_ms
),
final_insn_locations
(
p_fil
),
m_zipr
(
p_zipr
),
m_verbose
(
"verbose"
),
m_on
(
false
)
{
if
(
p_firp
==
NULL
)
...
...
@@ -42,6 +41,9 @@ class Xeon_relocs : public ZiprPluginInterface_t
}
if
(
m_on
)
cout
<<
"Xeon_relocs plugin: Turning plugin on."
<<
endl
;
auto
global
=
p_zipr
->
getOptionsManager
()
->
getNamespace
(
"global"
);
m_verbose
=
global
->
getBooleanOption
(
"verbose"
);
}
...
...
@@ -58,7 +60,7 @@ class Xeon_relocs : public ZiprPluginInterface_t
cout
<<
"Xeon_relocs: Updating bounds check"
<<
endl
;
UpdateAddrRanges
();
}
virtual
ZiprOptionsNamespace_t
*
registerOptions
(
ZiprOptionsNamespace_t
*
);
//
virtual ZiprOptionsNamespace_t *registerOptions(ZiprOptionsNamespace_t *);
virtual
bool
willPluginPlop
(
Instruction_t
*
);
virtual
RangeAddress_t
plopDollopEntry
(
DollopEntry_t
*
,
RangeAddress_t
&
,
...
...
@@ -84,7 +86,7 @@ class Xeon_relocs : public ZiprPluginInterface_t
MemorySpace_t
*
m_memory_space
;
InstructionLocationMap_t
*
final_insn_locations
;
Zipr_t
*
m_zipr
;
ZiprBooleanOption_t
m_verbose
;
ZiprBooleanOption_t
*
m_verbose
;
bool
m_on
;
// bounds check updates
InstructionSet_t
max_addr_update
;
...
...
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