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


Date: Mon, 26 Oct 2015 13:07:21 -0500
From: Bill Williams <bill@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] Inserting x86 traps before points of interest
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→]