Skip to content

Commit

Permalink
Add dyninstAPI/src/instPoint.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 393efe3 commit 71822b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions docs/dyninstAPI/developer/instPoint.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ instPoint.h
.. cpp:function:: static instPoint *postCall(func_instance *, block_instance *)

.. cpp:function:: static std::pair<instPoint *, instPoint *> getInstpointPair(instPoint *)

If there is a logical "pair" (e.g., before/after) of instPoints return them. The return result is a
pair of ``<before, after>``.

.. cpp:function:: static instPoint *fork(instPoint *parent, AddressSpace *as)
.. cpp:function:: ~instPoint()

Expand Down Expand Up @@ -50,6 +54,10 @@ instPoint.h

.. cpp:function:: block_instance *block_compat() const

Returns the current block (if there is one) or the next block we're going to execute (if not). In
some cases we may not know; function exit points and the like. In this case we return the current
block as a "well, this is what we've got..."

This is for address tracking... if we're between blocks (e.g., post-call, function exit, or edge instrumentation) and thus aren't
strongly tied to a block give us the next block that will execute. Unlike block() above, this always works.

Expand Down
8 changes: 0 additions & 8 deletions dyninstAPI/src/instPoint.C
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ instPoint::instPoint(Type t,
baseTramp_(NULL) {
}


// If there is a logical "pair" (e.g., before/after) of instPoints return them.
// The return result is a pair of <before, after>
std::pair<instPoint *, instPoint *> instPoint::getInstpointPair(instPoint *i) {
switch(i->type()) {
case None:
Expand Down Expand Up @@ -309,11 +306,6 @@ baseTramp *instPoint::tramp() {
return baseTramp_;
}

// Returns the current block (if there is one)
// or the next block we're going to execute (if not).
// In some cases we may not know; function exit points
// and the like. In this case we return the current block
// as a "well, this is what we've got..."
block_instance *instPoint::block_compat() const {
switch (type_) {
case FuncEntry:
Expand Down

0 comments on commit 71822b1

Please sign in to comment.