From: Jeremy F. <je...@go...> - 2002-10-01 06:49:53
|
I'm writing a skin to generate gprof-like output, so I need to see all the edges in the control flow graph. In particular, I'd like to insert some instrumentation code which is run IFF a conditional branch is taken. I see a few options: * something to properly represent uInstr sequences with conditionals within the ucode for one real instruction (ie, some way of representing jumps to real addresses rather than simulated addresses). Sounds messy. * Intercept the jump target address and generate a completely new piece of code at some place within the simulated address space. Ugly. * Introduce a new exceptional value for ebp when it is passed back into the dispatcher to trigger a call into the skin. Would need some way to attach some kind of argument values for the call (encode in %edx?). Seems like the least nasty. Any opinions? J |