| Date: | Wed, 14 Sep 2016 13:36:37 +0000 |
|---|---|
| From: | Mohamed Elsabagh <melsabag@xxxxxxx> |
| Subject: | Re: [DynInst_API:] Directly reassemble and patch instructions |
|
Thanks, Bill. Wouldn't the PatchAPI::ReplaceCallCommand help here? I have tried to use it but it doesn't seem to be having any effect. For instance, the following snippet does not change the binary in any way:Â patcher.add(ReplaceCallCommand::create(mgr, block, func, nullptr)); if (!patcher.run()) { Â cerr << "patch failed"; Â exit(EXIT_FAILURE); } appBin->writeFile(output_path);Â Am I doing something wrong? Do I need to implement any stubs for the PatchAPI to function? I can provide a MWE if needed. On Mon, Sep 12, 2016 at 12:21 PM Bill Williams <bill@xxxxxxxxxxx> wrote: The way I'd go about this would be with PatchAPI and pulling some of the abstract classes out of dyninstAPI/src/Relocation. (And yes, I am about to outline use of a machine gun to kill a mosquito, but I trust you want that mosquito *dead*.) |
| [← Prev in Thread] | Current Thread | [Next in Thread→] |
|---|---|---|
| ||
| Previous by Date: | Re: [DynInst_API:] instructionAPI fails on ARM 64, Barton Miller |
|---|---|
| Next by Date: | [DynInst_API:] [dyninst/dyninst] 5bc0be: When determining the ROSE register category for AR..., Sunny Shah |
| Previous by Thread: | Re: [DynInst_API:] Directly reassemble and patch instructions, Bill Williams |
| Next by Thread: | Re: [DynInst_API:] Directly reassemble and patch instructions, Bill Williams |
| Indexes: | [Date] [Thread] |