[DynInst_API:] =?gb18030?b?u9i4tKO6ICBkeW5pbnN0IGhlbHA=?=


Date: Thu, 06 Aug 2015 00:26:25 +0800
From: =?gb18030?b?ZHh5?= <2354528200@xxxxxx>
Subject: [DynInst_API:] =?gb18030?b?u9i4tKO6ICBkeW5pbnN0IGhlbHA=?=
I don't understand
In your code, you use the interface for instrumenting general
instructions, so you would not get call site instrumentation point
what this mean.
My goal is to instrument before every call  instruction and ret instruction. I think the general way you point out may be not acceptable.
And I want know whether the only way to reply is to use email? I'm first time to use this.


------------------ 原始邮件 ------------------
发件人: "Xiaozhu Meng"<xmeng@xxxxxxxxxxx>;
发送时间: 2015年8月6日(星期四) 凌晨0:15
收件人: "dxy"<2354528200@xxxxxx>;
抄送: "dyninst-api"<dyninst-api@xxxxxxxxxxx>;
主题: Re: [DynInst_API:] dyninst help

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 <2354528200@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
>
[← Prev in Thread] Current Thread [Next in Thread→]