Re: [DynInst_API:] Inserting x86 traps before points of interest


Date: Mon, 26 Oct 2015 18:11:46 +0000
From: Yasser Shalabi <yassershalabi@xxxxxxxxx>
Subject: Re: [DynInst_API:] Inserting x86 traps before points of interest

I need int3 to trigger the hypervisor. I am running in virtualized settings. I want to statically instrument the binary at points of interest to trigger these virtualization exits.


On Mon, Oct 26, 2015, 1:07 PMÂBill Williams <bill@xxxxxxxxxxx> wrote:
On 10/26/2015 01:00 PM, Yasser Shalabi wrote:
> Thanks for the quick reply bill!
>
> When I try:
>
>Â Â Â app->insertSnippet(BPatch_breakPointExpr(), instrumentation_points);
>Â Â Â BPatch_binaryEdit *appBin = dynamic_cast<BPatch_binaryEdit *>(app);
>Â Â Â appBin->writeFile(newName);
>
> I get an assertion failure:
>
> DyninstAPI-9.0.3/dyninstAPI/src/ast.C:2072: virtual bool
> AstCallNode::initRegisters(codeGen&): Assertion `callee' failed.
>
> Any tips on how to approach?
...what function is it trying to insert a call to? (A call stack from
gdb should be sufficient.) And what platform are you on?

In any event, a breakpointexpr may well not do the right thing in
rewriter mode; it's intended for use when Dyninst is serving as a live
debugger for the process. What's the bigger picture? What do you want to
accomplish when these traps are hit?

On Mon, Oct 26, 2015 at 11:11 AM, Bill Williams <bill@xxxxxxxxxxx> wrote:
>> On 10/26/2015 10:33 AM, Yasser Shalabi wrote:
>>
>> I want to insert int3 before points of interest.I have collected these
>> points using Dyninst. Any pointers on which parts of the API to instrument
>> these points with int3 instructions?
>>
>> A BPatch_breakpointExpr should do the trick.
>>
>> Thanks!
>> Yasser
>>
>>
>>
>> _______________________________________________
>> Dyninst-api mailing list
>> Dyninst-api@xxxxxxxxxxx
>> https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
>>
>>

[← Prev in Thread] Current Thread [Next in Thread→]