Re: [DynInst_API:] snippet insertions


Date: Mon, 26 Feb 2018 16:57:19 +0000
From: Bill Williams <bill@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] snippet insertions
Can you give me a bit more information about the modifications you're trying to make? Are you trying to use local variables as function parameters, for example?

In general, if the BPatch interface doesn't provide an abstract way to do what you want, it means we've missed a use case and should consider adding a feature. Modifying platform-specific call snippet generation is almost never the right answer, and gets very tricky very fast.

--bw
________________________________________
From: Dyninst-api <dyninst-api-bounces@xxxxxxxxxxx> on behalf of Rohit Poduri <poduri.rohit@xxxxxxxxx>
Sent: Saturday, February 24, 2018 1:24 AM
To: dyninst-api@xxxxxxxxxxx
Subject: [DynInst_API:] snippet insertions

I am using dyninst to do some static instrumentation by patching instructions and inserting function call instrumentation snippets on x86_64. I am trying to modify the register save/restore process for certain registers that happens during the trampoline code. So I am trying to pass some kind of information during the snippet insertion process that can be sent to the whole base trampoline code.

The problem is I am unable to figure out the exact change that happens in the address space structure which is then sent to the binary edit function. If someone could point me to the exact field in the BPatch_addressSpace and correspondingly BPatch_binaryEdit structure after snippet insertion, it would be helpful.

Also the exact code that I need to modify is located in the function Register EmitterAMD64::emitCall located in the file emit-x86.C, which is reached during the call to the function writeFile(). If someone could point me to the exact path from writeFile to emitCall it would helpful.

Thanks,
Rohit

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