Callgrind: Fix failed assertion at toggling instrumentation mode
When instrumentation mode is switched off, we want to fully
reset callgrinds internal execution state, which includes
the shadow call stack and function stack for context generation.
The latter was not completely reset before.
The bug showed up when switching the instrumentation mode on for
the second time, leading to
Callgrind: callstack.c:211 (vgCallgrind_push_call_stack):
Assertion 'current_entry->cxt != 0' failed.
This commit also improves debug output a little bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6045 a5019735-40e9-0310-863c-91ae7b9d1cf9
3 files changed