Stan reported this problem as issue 634 (https://github.com/dyninst/dyninst/issues/634) yesterday. I am able to reproduce this problem and identify what caused the problem.
The problem here is that during dynamic instrumentation by attaching to the mutatee process, instrumentation seems to be removed by calling BPatch_process::detach(), and this problem only shows up on power, not x8664 or ARM.
It turns out that in this case, a trap springboard is used to transfer program execution from original code to instrumentation. In dynamic instrumentation, all trap instructions generated by Dyninst are also considered as software break points by Dyninst, and Dyninst decides to remove all software break points when it detaches from the mutatee.
I am not sure how many and when software break points are used in Dyninst, but a springboard trap does not serve the purpose as a software break point and should not be removed during detaching.
So, my plan is to simply generate a trap instruction when a trap springboard is needed, without registering this trap as a software break point.
Let me know if there are any concerns.
Thanks,
âXiaozhu
Ah good point: POWER8 (architected), altivec supported <smoke-test.tar>_______________________________________________ Dyninst-api mailing list Dyninst-api@xxxxxxxxxxxhttps://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
|