|
From: <sv...@va...> - 2005-09-21 09:25:48
|
Author: sewardj
Date: 2005-09-21 10:25:40 +0100 (Wed, 21 Sep 2005)
New Revision: 4716
Log:
Comment wibbles.
Modified:
branches/ASPACEM/coregrind/m_main.c
Modified: branches/ASPACEM/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/coregrind/m_main.c 2005-09-21 04:44:28 UTC (rev 4715=
)
+++ branches/ASPACEM/coregrind/m_main.c 2005-09-21 09:25:40 UTC (rev 4716=
)
@@ -1909,9 +1909,14 @@
struct vki_rlimit zero =3D { 0, 0 };
=20
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+ //
// Nb: startup is complex. Prerequisites are shown at every step.
+ // *** Be very careful when messing with the order ***
//
- // *** Be very careful when messing with the order ***
+ // The first order of business is to get debug logging, the address
+ // space manager and the dynamic memory manager up and running.
+ // Once that's done, we can relax a bit.
+ //
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
/* This is needed to make VG_(getenv) usable early. */
@@ -1993,25 +1998,23 @@
}
VG_(debugLog)(1, "main", "Dynamic memory manager is running\n");
=20
+ //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+ //
+ // Dynamic memory management is now available.
+ //
+ //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
//--------------------------------------------------------------
// Extract the stage1 name from the environment.
VG_(debugLog)(1, "main", "Getting stage1's name\n");
name_of_stage1 =3D VG_(getenv)(VALGRINDSTAGE1);
if (name_of_stage1 =3D=3D NULL) {
- VG_(printf)("valgrind: You cannot run the tool binary directly.\n"=
);
+ VG_(printf)("valgrind: You cannot run '%s' directly.\n", argv[0]);
VG_(printf)("valgrind: You should use $prefix/bin/valgrind.\n");
VG_(exit)(1);
}
=20
- //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
- // Command line argument handling order:
- // * If --help/--help-debug are present, show usage message=20
- // (including the tool-specific usage)
- // * (If no --tool option given, default to Memcheck)
- // * Then, if client is missing, abort with error msg
- // * Then, if any cmdline args are bad, abort with error msg
- //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-
+ //--------------------------------------------------------------
// Get the current process datasize rlimit, and set it to zero.
// This prevents any internal uses of brk() from having any effect.
// We remember the old value so we can restore it on exec, so that
@@ -2045,6 +2048,15 @@
VG_(libdir) =3D cp;
}
=20
+ //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+ // Command line argument handling order:
+ // * If --help/--help-debug are present, show usage message=20
+ // (including the tool-specific usage)
+ // * (If no --tool option given, default to Memcheck)
+ // * Then, if client is missing, abort with error msg
+ // * Then, if any cmdline args are bad, abort with error msg
+ //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
//--------------------------------------------------------------
// Get valgrind args + client args (inc. from VALGRIND_OPTS/.valgrind=
rc).
// Pre-process the command line.
|