Hi, It seems to me that you should use a different way to get function call instrumentation points. I would recommend that you first get the set of functions that you are interested; then for each function, you can get all the call site instrumentation points. So I guess you want code like:
funcs = appImage->getProcedures(); // for each function f in funcs points = f->findPoints(BPatch_subroutine); Then points would contain function call instrumentation points in this function. Note that the above code is just for illustration. You can refer to the sections of BPatch_image and BPatch_function in dyninstAPI manual to get detailed information about these interfaces. In your code, you use the interface for instrumenting general instructions, so you would not get call site instrumentation points. Hope this can help. Thanks --Xiaozhu On Tue, Aug 4, 2015 at 9:08 PM, dxy <2354528...@qq.com> wrote: > Hello,I am writing a program using dynisnt to avoid buffer overflow.I meet > one trouble.Hope to get help from you. > > if(category == > Dyninst::InstructionAPI::c_CallInsn) { > vector<BPatch_point *> callPoints; > appImage->findPoints(addr, callPoints); > > BPatch_function * > fun1=callPoints[0]->getCalledFunction(); > } > I don't know why this didn't work. fun1==NULL.every time. > > _______________________________________________ > Dyninst-api mailing list > Dyninst-api@cs.wisc.edu > https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api > _______________________________________________ Dyninst-api mailing list Dyninst-api@cs.wisc.edu https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api