Re: [DynInst_API:] Slice on base + displacement?


Date: Thu, 27 Aug 2015 16:56:33 -0400
From: Mohamed Elsabagh <melsabag@xxxxxxx>
Subject: Re: [DynInst_API:] Slice on base + displacement?
Thanks, Xiaozhu. That pointed me in the right direction.

Mohamed

On Thu, Aug 27, 2015 at 4:35 PM, Xiaozhu Meng <xmeng@xxxxxxxxxxx> wrote:
Hi Mohamed,

If you only want to include instructions that affect the address calculation and ignore the instructions that change the memory contents, you can extend the Slicer::Predicate class to achieve the purpose. Basically, a predicate tells the slicer when to stop slicing and what to ignore during the slicing. You can then use a predicate to tell the slicer to ignore instructions that change memory contents. Specifically, you can have code like:

class MyPredicate: public Slicer::Predicate {
 Âvirtual bool endAtPoint(AssignmentPtr assign) {
    /* Tell the slicer to stop when the instruction
      writes memory */
    return assign->insn()->writesMemory();  Â
 Â}
};

By using a customized predicate, you can better control your slice.

Thanks

--Xiaozhu

On Thu, Aug 27, 2015 at 2:51 PM, Mohamed Elsabagh <melsabag@xxxxxxx> wrote:
Hello,Â

Is there a way to tell the DataflowAPI slicer to slice on a specific <base + displacement> _expression_? For example, I want to slice on the instruction:Âmov $18(%esp), %eax, but only include those instructions that affect $18(%esp).

Thanks,
Mohamed

_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api



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