From: Nicholas N. <nj...@ca...> - 2003-04-17 08:47:04
|
On Thu, 17 Apr 2003, Jeremy Fitzhardinge wrote: > > Would a client request be a good compromise? Eg. insert > > VALGRIND_STACK_SWITCH just before the stack switch? It's more > > intrusive than a command line option, but it's more precise. Similar > > to the client request for handling self-modifying code. > > > > [I haven't thought through how the request would actually be > > implemented, but it shouldn't be too hard, I think...] > > Yeah, it would. It would need to mean something like "the next change to %esp is > a stack switch", but what if changing the stack changes %esp multiple times? How > do you know if the compiler is going to generate some non-stack switch changes to > %esp as part of its codegen? Maybe have VALGRIND_START_STACK_SWITCH and VALGRIND_END_STACK_SWITCH, and within that look for a "sizeable" %esp change (eg. anything bigger than 1KB or something) as a genuine switch? Or maybe not, I don't know. > I think the correct solution is to move stack switch detection into the skin > themselves (memcheck, addrcheck and helgrind are the only ones I know of which > care). Memcheck and addrcheck can use their existing validity info to make the > determination; helgrind is harder. How does validity info help? N |