Skip to content

Commit

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

.. cpp:namespace:: Dyninst::Relocation

.. cpp:class:: adhocMovementTransformer : public Transformer

Identify PC-relative memory accesses and replace them with a dedicated Widget

.. cpp:type:: private boost::shared_ptr<RelocInsn> RelocInsnPtr
.. cpp:type:: private boost::shared_ptr<InstructionAPI::Instruction> InsnPtr

.. cpp:function:: virtual bool process(RelocBlock *, RelocGraph *)
.. cpp:function:: adhocMovementTransformer(AddressSpace *as)
.. cpp:function:: virtual ~adhocMovementTransformer()
.. cpp:function:: private bool isPCDerefCF(WidgetPtr ptr, InstructionAPI::Instruction insn, Address &destPtr)
.. cpp:function:: private bool isPCRelData(WidgetPtr ptr, InstructionAPI::Instruction insn, Address &target)
.. cpp:function:: private bool isGetPC(WidgetPtr ptr, InstructionAPI::Instruction insn, Absloc &aloc, Address &thunkAddr)

Records where PC was stored

.. cpp:function:: private bool isStackFrameSensitive(Offset& origOffset, signed long& delta,\
const Accesses* accesses, OffsetVector*& offVec,\
TMap*& tMap, ParseAPI::Block* block, Address addr)
.. cpp:member:: private AddressSpace *addrSpace

Used for finding call targets

.. cpp:member:: private std::map<Address, std::pair<Offset, signed long> > definitionDeltas

Map of definition addresses to (origDisp, delta) pairs

3 changes: 1 addition & 2 deletions dyninstAPI/src/Relocation/Transformers/Movement-adhoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ namespace Dyninst {

namespace Relocation {
class RelocInsn;
// Identify PC-relative memory accesses and replace
// them with a dedicated Widget

class adhocMovementTransformer : public Transformer {
typedef boost::shared_ptr<RelocInsn> RelocInsnPtr;
typedef boost::shared_ptr<InstructionAPI::Instruction> InsnPtr;
Expand Down

0 comments on commit d3d617e

Please sign in to comment.