Fixed a bug in Cachegrind -- if the profiled program changes working directory,
the output file wouldn't get written.  No longer creating the file at startup
and then writing it at the end;  just writing it at the end.  Also recording
the start directory at the start so that the output ends up in it even if the
program does change directory.

Had to add VG_(getcwd)() to vg_mylibc.c for this.

Added a regression test for it too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1576 a5019735-40e9-0310-863c-91ae7b9d1cf9
7 files changed