Skip to content

Commit

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

.. cpp:namespace:: Dyninst::Relocation

.. cpp:class:: Modification : public Transformer

.. cpp:type:: std::list<RelocBlock *> RelocBlockList
.. cpp:type:: Dyninst::PatchAPI::CallModMap CallModMap

Block (IDing a call site) -> func

.. cpp:type:: Dyninst::PatchAPI::FuncModMap FuncModMap
.. cpp:type:: Dyninst::PatchAPI::FuncWrapMap FuncWrapMap

.. cpp:function:: virtual bool process(RelocBlock *cur, RelocGraph *)
.. cpp:function:: Modification(const CallModMap &callRepl, const FuncModMap &funcRepl, const FuncWrapMap &funcWrap)
.. cpp:function:: virtual ~Modification()
.. cpp:function:: private bool replaceCall(RelocBlock *trace, RelocGraph *)
.. cpp:function:: private bool replaceFunction(RelocBlock *trace, RelocGraph *)
.. cpp:function:: private bool wrapFunction(RelocBlock *trace, RelocGraph *)
.. cpp:function:: private RelocBlock *makeRelocBlock(block_instance *block, func_instance *func, RelocBlock *cur, RelocGraph *cfg)
.. cpp:member:: private const CallModMap &callMods_
.. cpp:member:: private const FuncModMap &funcReps_
.. cpp:member:: private const FuncWrapMap &funcWraps_


.. cpp:struct:: Modification::WrapperPredicate

.. cpp:function:: WrapperPredicate(func_instance *f)
.. cpp:member:: func_instance *f_
.. cpp:function:: bool operator()(RelocEdge *e)


.. cpp:struct:: Modification::WrapperPatch : public Patch

.. cpp:function:: WrapperPatch(func_instance *func, std::string name)
.. cpp:function:: virtual bool apply(codeGen &gen, CodeBuffer *buf)
.. cpp:function:: virtual unsigned estimate(codeGen &)
.. cpp:function:: virtual ~WrapperPatch()
.. cpp:member:: func_instance *func_
.. cpp:member:: std::string name_
4 changes: 0 additions & 4 deletions dyninstAPI/src/Relocation/Transformers/Modification.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,10 @@ namespace Relocation {

class Modification : public Transformer {
public:
// Mimics typedefs in CodeMover.h, but I don't want
// to include that file.
typedef std::list<RelocBlock *> RelocBlockList;
//typedef std::map<Address, RelocBlockList> RelocBlockMap;

// Block (IDing a call site) -> func
typedef Dyninst::PatchAPI::CallModMap CallModMap;
// func -> func
typedef Dyninst::PatchAPI::FuncModMap FuncModMap;
typedef Dyninst::PatchAPI::FuncWrapMap FuncWrapMap;

Expand Down

0 comments on commit c716557

Please sign in to comment.