How can i iterate over a basic blocks in a specific routine in intel pintool? -
i tried iterate on basic blocks in specific routine, found problems:
void routine(rtn rtn, void *v) { rtn_open(rtn) (bbl bbl = rtn_bblhead(rtn); bbl_valid(bbl); bbl = bbl_next(bbl)) { /* code */ } rtn_close(rtn); }
error: deprecated-declarations,
how can fix error, or way ?
you have deprecated-declarations warning because rtn_bblhead
deprecated. use rtn_inshead
instead.
from include\pin\gen\image.ph
:
/* not edit */ /* rtn_bblhead deprecated. see rtn_inshead. */ extern pin_deprecated_api bbl rtn_bblhead(rtn x);
this mentioned in documentation: rtn_bblhead
you can pass -wno-deprecated-declarations
gcc suppress warning.
edit
remember pin above dbi (dynamic binary instrumentation) framework: extremely when comes instrument executed code flow, , less when needs break down non executed code.
routine instrumentation lets pintool inspect , instrument entire routine when image contained in first loaded' documentation points:
a pintool can walk instructions of routine. there not enough information available break instructions bbls.
pin find instructions of rtn through static discovery, pin cannot guarantee find instructions in rtn , more difficult bbls. guess tried @ point (hence availability of rtn_bblhead in past) provide static discovery of bbls discovery rate low (or error prone) deemed acceptable, function became deprecated.
in short, yes need discover rtn instructions instructions (knowing pin might miss instructions done statically). can discover bbls of routine if routine executed @ point.
Comments
Post a Comment