|
From: Nicholas N. <nj...@ca...> - 2003-05-04 12:28:07
|
On Sun, 4 May 2003, Johan Rydberg wrote: > Anyways, how is translation done in valgrind? Or, what is > translated? What terminates a basic block? The first branch > insn that is encountered, or when the first final (non-cond) > branch insn is hit? If the basic block is terminated on the > first final insn, is inner block loops resolved and optimized? Basic blocks are terminated on any branch instruction. > Second, how is chaining done when the basic block has more than > one exit (ie is terminated with a conditional cti insn). May > a basic block have more than one place that can be patched to > chain the block to another block? I don't know much about the chaining, I'll let others answer that... > Third, how does V handle the problems with self-modifying code? > Or is this a non-problem when it comes to running normal > user-land programs. It used to handle it, but the support was removed because it was a pain and it's rarely an issue. Howver, Valgrind does have a client request VALGRIND_DISCARD_TRANSLATIONS which you can embed in any program that generates/modifies code. It's mostly used, AFAICT, for JITters and the like. N |