Skip to content

Commit

Permalink
Add dyninstAPI/Instrumenter.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent cd1be8f commit 690815e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,46 @@ Instrumenter.h
##############

.. cpp:namespace:: Dyninst::Relocation

.. cpp:class:: Instrumenter : public Transformer

.. cpp:function:: virtual bool process(RelocBlock *cur, RelocGraph *)
.. cpp:function:: Instrumenter()
.. cpp:function:: virtual ~Instrumenter()

.. cpp:type:: private std::pair<RelocBlock *, When> InsertPoint
.. cpp:type:: private std::map<InsertPoint, std::list<RelocBlock *> > EdgeRelocBlocks
.. cpp:type:: private boost::shared_ptr<CFWidget> CFWidgetPtr
.. cpp:function:: private bool funcEntryInstrumentation(RelocBlock *trace, RelocGraph *cfg)

The instrumenters that can add new RelocBlocks have the CFG as an argument

.. cpp:function:: private bool edgeInstrumentation(RelocBlock *trace, RelocGraph *cfg)
.. cpp:function:: private bool postCallInstrumentation(RelocBlock *trace, RelocGraph *cfg)
.. cpp:function:: private bool funcExitInstrumentation(RelocBlock *trace, RelocGraph *cfg)
.. cpp:function:: private bool blockEntryInstrumentation(RelocBlock *trace)
.. cpp:function:: private bool blockExitInstrumentation(RelocBlock *trace)
.. cpp:function:: private bool preCallInstrumentation(RelocBlock *trace)
.. cpp:function:: private bool insnInstrumentation(RelocBlock *trace)
.. cpp:function:: private bool handleUnconditionalExitInstrumentation(RelocBlock *trace, RelocGraph *cfg, instPoint *exit)
.. cpp:function:: private bool handleCondIndExits(RelocBlock *trace, RelocGraph *cfg, instPoint *exit)
.. cpp:function:: private bool handleCondDirExits(RelocBlock *trace, RelocGraph *cfg, instPoint *exit)
.. cpp:function:: private WidgetPtr makeInstrumentation(PatchAPI::Point *point)


.. cpp:enum:: Instrumenter::When

.. cpp:enumerator:: Before
.. cpp:enumerator:: After


.. cpp:struct:: Instrumenter::CallFallthroughPredicate

.. cpp:function:: private bool operator()(RelocEdge *e)


.. cpp:struct:: Instrumenter::EdgePredicate

.. cpp:function:: private EdgePredicate(edge_instance *e)
.. cpp:function:: private bool operator()(RelocEdge *e)
.. cpp:member:: private edge_instance *e_
2 changes: 0 additions & 2 deletions dyninstAPI/src/Relocation/Transformers/Instrumenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ class Instrumenter : public Transformer {
typedef std::map<InsertPoint, std::list<RelocBlock *> > EdgeRelocBlocks;
typedef boost::shared_ptr<CFWidget> CFWidgetPtr;

// The instrumenters that can add new RelocBlocks have the CFG as an
// argument
bool funcEntryInstrumentation(RelocBlock *trace, RelocGraph *cfg);
bool edgeInstrumentation(RelocBlock *trace, RelocGraph *cfg);
bool postCallInstrumentation(RelocBlock *trace, RelocGraph *cfg);
Expand Down

0 comments on commit 690815e

Please sign in to comment.