]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make the is_stage2 test work when running Valgrind in-place in a
authorNicholas Nethercote <njn@valgrind.org>
Sat, 25 Jun 2005 19:45:34 +0000 (19:45 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sat, 25 Jun 2005 19:45:34 +0000 (19:45 +0000)
source tree.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4020

coregrind/m_aspacemgr/aspacemgr.c

index 1c6d921d92ebf68c7c25dbc6fc02b5144d15f758..9cc3ea404914cfcd863b0dc3c54ea2d778875f89 100644 (file)
@@ -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)(