From: Nicholas Nethercote Date: Sat, 25 Jun 2005 19:45:34 +0000 (+0000) Subject: Make the is_stage2 test work when running Valgrind in-place in a X-Git-Tag: svn/VALGRIND_3_0_0~298 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1708cccb0d562769e0809d8df135dd3bd3f7327f;p=thirdparty%2Fvalgrind.git Make the is_stage2 test work when running Valgrind in-place in a source tree. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4020 --- diff --git a/coregrind/m_aspacemgr/aspacemgr.c b/coregrind/m_aspacemgr/aspacemgr.c index 1c6d921d92..9cc3ea4049 100644 --- a/coregrind/m_aspacemgr/aspacemgr.c +++ b/coregrind/m_aspacemgr/aspacemgr.c @@ -738,8 +738,12 @@ VG_(map_file_segment)( Addr addr, SizeT len, static const Bool debug = False || mem_debug; Segment* s; Int idx; - HChar* stage2_suffix = "lib/valgrind/stage2"; - Bool is_stage2 = VG_(strstr)(filename, stage2_suffix) != NULL; + HChar* stage2_suffix1 = "lib/valgrind/stage2"; + HChar* stage2_suffix2 = "coregrind/stage2"; + Bool is_stage2 = False; + + is_stage2 = is_stage2 || ( VG_(strstr)(filename, stage2_suffix1) != NULL ); + is_stage2 = is_stage2 || ( VG_(strstr)(filename, stage2_suffix2) != NULL ); if (debug) VG_(printf)(