|
From: Stephen M.
|
The shadow guest state is a part of the Valgrind machine state used by tools to record shadow information associated with registers: for instance, Memcheck uses it to store the V bits of values in registers. At the moment, the size of the shadow guest state is hard-coded to be equal in size to the regular guest state it shadows, which happens to work well for Memcheck because (uncompressed) V bits use one bit for each data bit. However, I've now worked on a couple of other shadow-value-style tools where this limitation was a problem, since I wanted to store more shadow state with each register. I ended up finding the right set of places to change to hard-code a larger limit, but I think a better fix would be to make this configurable on a per-tool basis. The most obvious interface to me would be for the tool to specify an integer multiplier; then the shadow guest state size would be that multiple of the regular guest state size. Memcheck would supply 1 as the multiplier, and tools that don't need shadow register values could use 0 (which also seems like the best default). Does this sound like a good idea? If so, I'd be willing to work on a patch. -- Stephen |