On 04/26/2012 07:45 PM, Andrew Bernat wrote:
> Ah. I bet they're being labeled uninstrumentable, probably because
> there's an indirect branch somewhere in the body.
What, you mean that innocent little "jmpq *%rdx" at the end?
> The findFunction method you're using has an "include
> uninstrumentable" option; I don't remember exactly which one it is.
> Set that to true and see if the lookup error goes away. If so, that's
> the problem. I can explain more if you want, but the short version is
> "we're not sure if we can safely modify the function, so we mark it
> off-limits."
Yes you're right, with that uninstrumentable flag set true, findFunction
does find those two longjmp functions. Then findPoint(BPatch_entry)
fails, which you probably expect.
As I asked before, would a 5-byte NOP for the SDT case help here? Then
you could possibly insert a jump without moving the rest of the function
around, which is why indirect jumps are generally avoided, right?
> Meanwhile, the address-primary point lookup completely ignores all
> that for the lookup, but should again fail to actually instrument.
Well createPointsAtAddr + insertSnippet appears to succeed -- what
indication of failure should I see? (Besides just not running...)
Josh
|