Skip to content

Commit

Permalink
Add patchAPI/src/ParseCallback.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 0dcb097 commit 6256d62
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 7 additions & 0 deletions docs/patchAPI/developer/ParseCallback.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ ParseCallback.h
.. cpp:function:: protected virtual void add_edge_cb(ParseAPI::Block*, ParseAPI::Edge*, edge_type_t)
.. cpp:function:: protected virtual void remove_block_cb(ParseAPI::Function*, ParseAPI::Block*)
.. cpp:function:: protected virtual void add_block_cb(ParseAPI::Function*, ParseAPI::Block*)

Adds blocks lazily, basically does nothing unless block and function have already been created, in
which case it adds the block to the function.

.. cpp:function:: protected virtual bool absAddr(Address absolute, Address& loadAddr, ParseAPI::CodeObject*& containerObject)

Returns the load address of the code object containing an absolute address.


Notes
=====

Expand Down
3 changes: 0 additions & 3 deletions patchAPI/src/ParseCallback.C
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ void PatchParseCallback::remove_block_cb(ParseAPI::Function *func, ParseAPI::Blo
pf->removeBlock(pb);
}

/* Adds blocks lazily, basically does nothing unless block and function have already
been created, in which case it adds the block to the function */
void PatchParseCallback::add_block_cb(ParseAPI::Function *func, ParseAPI::Block *block) {
PatchBlock *pb = _obj->getBlock(block, false);
if (!pb) return;
Expand All @@ -209,7 +207,6 @@ void PatchParseCallback::add_block_cb(ParseAPI::Function *func, ParseAPI::Block
_obj->cb()->add_block(pf,pb);
}

// returns the load address of the code object containing an absolute address
bool PatchParseCallback::absAddr(Address absolute,
Address & loadAddr,
ParseAPI::CodeObject *& codeObj)
Expand Down
1 change: 0 additions & 1 deletion patchAPI/src/ParseCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class PatchParseCallback : public ParseAPI::ParseCallback {
virtual void remove_block_cb(ParseAPI::Function *, ParseAPI::Block *);
virtual void add_block_cb(ParseAPI::Function *, ParseAPI::Block *);

// returns the load address of the code object containing an absolute address
virtual bool absAddr(Address absolute,
Address & loadAddr,
ParseAPI::CodeObject *& containerObject);
Expand Down

0 comments on commit 6256d62

Please sign in to comment.