Skip to content

Commit

Permalink
Update parseAPI/h/CodeObject.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent bba7b33 commit 39c0a9c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
13 changes: 13 additions & 0 deletions docs/parseAPI/developer/CodeObject.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ CodeObject.h

Destroy the function listed.

.. cpp:function:: private void process_hints()
.. cpp:function:: private void add_edge(Block *src, Block *trg, EdgeTypeEnum et)
.. cpp:member:: private CodeSource * _cs
.. cpp:member:: private CFGFactory * _fact
.. cpp:member:: private ParseCallbackManager * _pcb

.. cpp:member:: private Parser * parser

parser implementation

.. cpp:member:: private bool owns_factory
.. cpp:member:: private bool defensive
.. cpp:member:: private funclist& flist


Notes
Expand Down
12 changes: 3 additions & 9 deletions parseAPI/h/CodeObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
namespace Dyninst {
namespace ParseAPI {

class Parser; // internals
class Parser;
class ParseCallback;
class ParseCallbackManager;
class CFGModifier;
Expand All @@ -70,8 +70,6 @@ class CodeObject {
bool ignoreParse = false);
PARSER_EXPORT ~CodeObject();

/** Parsing interface **/

PARSER_EXPORT void parse();

PARSER_EXPORT void parse(Address target, bool recursive);
Expand All @@ -84,7 +82,7 @@ class CodeObject {
Block *source;
Address target;
EdgeTypeEnum edge_type;
bool checked; // true if call_ft edges have already had their callees checked
bool checked;
NewEdgeToParse(Block *a, Address b, EdgeTypeEnum c) : source(a), target(b), edge_type(c), checked(false) {}
NewEdgeToParse(Block* a, Address b, bool c, EdgeTypeEnum d) : source(a), target(b), edge_type(d), checked(c) { }
};
Expand All @@ -93,8 +91,6 @@ class CodeObject {

PARSER_EXPORT void parseGaps(CodeRegion *cr, GapParsingType type=IdiomMatching);

/** Lookup routines **/

PARSER_EXPORT Function * findFuncByEntry(CodeRegion * cr, Address entry);
PARSER_EXPORT int findFuncsByBlock(CodeRegion *cr, Block* b, std::set<Function*> &funcs);
PARSER_EXPORT int findFuncs(CodeRegion * cr,
Expand All @@ -110,7 +106,6 @@ class CodeObject {

PARSER_EXPORT const funclist & funcs() { return flist; }

// blocks
PARSER_EXPORT Block * findBlockByEntry(CodeRegion * cr, Address entry);
PARSER_EXPORT int findBlocks(CodeRegion * cr,
Address addr, std::set<Block*> & blocks);
Expand Down Expand Up @@ -154,14 +149,13 @@ class CodeObject {
CFGFactory * _fact;
ParseCallbackManager * _pcb;

Parser * parser; // parser implementation
Parser * parser;

bool owns_factory;
bool defensive;
funclist& flist;
};

// We need CFG.h, which is included by this
template <class OutputIterator>
void Block::getFuncs(OutputIterator result) {
std::set<Function *> stab;
Expand Down

0 comments on commit 39c0a9c

Please sign in to comment.