Skip to content

Commit

Permalink
Add dyninstAPI/Relocation/Transformers/Movement-adhoc.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 6ac7158 commit e40a31d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@ Movement-adhoc.h
.. 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)

We define this as "uses PC and is not control flow"

.. 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)

Determines if an instruction is stack frame sensitive (i.e. needs to be updated with a new displacement). If so,
returns in delta the amount by which the displacement needs to be updated.

.. cpp:member:: private AddressSpace *addrSpace

Used for finding call targets
Expand Down
5 changes: 1 addition & 4 deletions dyninstAPI/src/Relocation/Transformers/Movement-adhoc.C
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ bool adhocMovementTransformer::isPCDerefCF(Widget::Ptr ptr,



// We define this as "uses PC and is not control flow"
bool adhocMovementTransformer::isPCRelData(Widget::Ptr ptr,
Instruction insn,
Address &target) {
Expand Down Expand Up @@ -496,9 +495,7 @@ bool adhocMovementTransformer::isGetPC(Widget::Ptr ptr,
}

#if defined(cap_stack_mods)
// Determines if an instruction is stack frame sensitive (i.e. needs to be
// updated with a new displacement). If so, returns in delta the amount by
// which the displacement needs to be updated.

bool adhocMovementTransformer::isStackFrameSensitive(Offset& origDisp,
signed long& delta,
const Accesses* accesses,
Expand Down

0 comments on commit e40a31d

Please sign in to comment.