From: Tom Hughes Date: Tue, 25 May 2010 08:45:44 +0000 (+0000) Subject: Set VG_(args_the_exename) to the full path to the script when X-Git-Tag: svn/VALGRIND_3_6_0~290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d2c5d0342d2122fc17ee49a8ec2b88debf36154;p=thirdparty%2Fvalgrind.git Set VG_(args_the_exename) to the full path to the script when loading a script as client. Closes #238345. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11134 --- diff --git a/coregrind/m_ume/script.c b/coregrind/m_ume/script.c index 44359f417f..13ca99192d 100644 --- a/coregrind/m_ume/script.c +++ b/coregrind/m_ume/script.c @@ -35,6 +35,8 @@ #include "pub_core_libcassert.h" // VG_(exit), vg_assert #include "pub_core_libcfile.h" // VG_(close) et al #include "pub_core_libcprint.h" +#include "pub_core_xarray.h" +#include "pub_core_clientstate.h" #include "pub_core_mallocfree.h" // VG_(strdup) #include "pub_core_ume.h" // self @@ -133,6 +135,8 @@ Int VG_(load_script)(Int fd, const HChar* name, ExeInfo* info) if (info->argv && info->argv[0] != NULL) info->argv[0] = (char *)name; + VG_(args_the_exename) = name; + if (0) VG_(printf)("#! script: interp_name=\"%s\" interp_args=\"%s\"\n", info->interp_name, info->interp_args);