Oh, I had forgot about the insertBefore and insertAfter flags, that is probably what I'll need to use.
Thanks Bill. -Wayne On Mon, July 21, 2014 11:53 am, Bill Williams wrote: > On 07/21/2014 11:45 AM, Wayne Motycka wrote: > >> I've been trying to find ways to instrument the edges in the Dyninst >> CFG >> but instrumenting the back edge from a system library call, e.g. calling >> printf(), doesn't give insertion points that seem reasonable/valid >> (the >> insertion point addresses given by getExitPoints() and getAllPoints() >> appears to be out of the local programs address ranges.) >> > It's possible (and if memory serves, it's likely) that when you're > inserting edge instrumentation, its instpoint address will be somewhere in > relocated code and will not correspond neatly to an original address. > (This is particularly true for call/return edges, as a particular > interprocedural edge doesn't live anywhere in the original binary.) We > *should* hand back NULL instpoints if they're really unusable. > > >> So, I'm thinking of moving that edge instrumenting code block into the >> edge that connects the calling block to the subsequent block along with >> the instrumenting code for that connecting edge, effectively marking >> that connecting edge as both the return path from the printf() system >> call and the inter-block connecting edge (which is EdgeTypeEnum type of >> "post-call >> fallthrough") >> > This is also a reasonable approach, and call fallthrough edges exist for > this sort of simplification. > >> My question is if it is possible to insert two snippets referencing >> calls to my edge marking library routine? >> > Yes, it's valid to insert multiple snippets at the same instrumentation > point; the "before/after" parameter to insertSnippet governs the relative > order of execution, if that's relevant to you. > >> Thanks, >> Wayne Motycka >> E2 Lab @ Univ. of Nebraska - Lincoln >> >> >> _______________________________________________ >> Dyninst-api mailing list >> Dyninst-api@cs.wisc.edu >> https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api >> >> > > > -- > --bw > > > Bill Williams > Paradyn Project > b...@cs.wisc.edu _______________________________________________ > Dyninst-api mailing list > Dyninst-api@cs.wisc.edu > https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api > > _______________________________________________ Dyninst-api mailing list Dyninst-api@cs.wisc.edu https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api