|
From: <sv...@va...> - 2005-09-27 10:44:44
|
Author: sewardj
Date: 2005-09-27 11:44:39 +0100 (Tue, 27 Sep 2005)
New Revision: 4787
Log:
Minor adjustments, mostly to a comment.
Modified:
branches/ASPACEM/coregrind/m_commandline.c
Modified: branches/ASPACEM/coregrind/m_commandline.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_commandline.c 2005-09-27 08:34:55 UTC (r=
ev 4786)
+++ branches/ASPACEM/coregrind/m_commandline.c 2005-09-27 10:44:39 UTC (r=
ev 4787)
@@ -95,10 +95,8 @@
}
=20
=20
-// Add args out of environment, skipping multiple spaces and "--" args.
-// We split 's' into multiple strings by replacing whitespace with nuls,
-// eg. "--aa --bb --cc" --> "--aa\0--bb\0--cc". And for each new string
-// carved out of 's', we put a pointer to it in 'to'.
+// Add args from a string into VG_(args_for_valgrind), splitting the
+// string at whitespace and adding each component as a separate arg.
=20
static void add_args_from_string ( HChar* s )
{
@@ -210,7 +208,7 @@
// VG_(malloc)(). We do not free f1_clo and f2_clo as they get
// put into VG_(args_for_valgrind) and so must persist.
HChar* f1_clo =3D read_dot_valgrindrc( VG_(getenv)("HOME") );
- HChar* env_clo =3D VG_(getenv)(VALGRIND_OPTS);
+ HChar* env_clo =3D VG_(strdup)( VG_(getenv)(VALGRIND_OPTS) );
HChar* f2_clo =3D read_dot_valgrindrc(".");
=20
if (f1_clo) add_args_from_string( f1_clo );
|