Skip to content

Commit

Permalink
Add dyninstAPI/src/Relocation/DynInstrumenter.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent b14cd6e commit 2e8c4fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 3 additions & 0 deletions docs/dyninstAPI/developer/Relocation/DynInstrumenter.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ DynInstrumenter.h
.. cpp:function:: DynInstrumenter()
.. cpp:function:: virtual ~DynInstrumenter()
.. cpp:function:: virtual bool run()

Instrumenter Command, which is called implicitly by Patcher's run()

.. cpp:function:: virtual bool undo()
.. cpp:function:: virtual bool isInstrumentable(PatchFunction*)

Expand Down
7 changes: 0 additions & 7 deletions dyninstAPI/src/Relocation/DynInstrumenter.C
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ using Dyninst::PatchAPI::DynReplaceFuncCommand;
using Dyninst::PatchAPI::DynModifyCallCommand;
using Dyninst::PatchAPI::DynRemoveCallCommand;

/* Instrumenter Command, which is called implicitly by Patcher's run() */
bool DynInstrumenter::run() {
DynAddrSpace* das = dynamic_cast<DynAddrSpace*>(as_);
std::set<AddressSpace*> seen;
Expand All @@ -62,8 +61,6 @@ bool DynInstrumenter::undo() {
return true;
}

/* Insert Snippet Command */

DynInsertSnipCommand::DynInsertSnipCommand(instPoint* pt, callOrder order,
AstNodePtr ast, bool recursive) {
inst_ = (order == orderFirstAtPoint) ? pt->pushFront(ast) : pt->pushBack(ast);
Expand All @@ -85,7 +82,6 @@ bool DynInsertSnipCommand::undo() {
return true;
}

/* Remove Snippet Command */
DynRemoveSnipCommand::DynRemoveSnipCommand(Dyninst::PatchAPI::Instance::Ptr inst) : inst_(inst) {
}

Expand All @@ -103,7 +99,6 @@ bool DynRemoveSnipCommand::undo() {
return true;
}

/* Replace Function Command */
DynReplaceFuncCommand::DynReplaceFuncCommand(AddressSpace* as,
func_instance* old_func,
func_instance* new_func)
Expand All @@ -126,7 +121,6 @@ bool DynReplaceFuncCommand::undo() {
return true;
}

/* Modify Call Command */
DynModifyCallCommand::DynModifyCallCommand(AddressSpace* as,
block_instance* block,
func_instance* new_func,
Expand All @@ -151,7 +145,6 @@ bool DynModifyCallCommand::undo() {
return true;
}

/* Remove Call Command */
DynRemoveCallCommand::DynRemoveCallCommand(AddressSpace* as,
block_instance* block,
func_instance* context)
Expand Down

0 comments on commit 2e8c4fe

Please sign in to comment.