]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Set VG_(args_the_exename) to the full path to the script when
authorTom Hughes <tom@compton.nu>
Tue, 25 May 2010 08:45:44 +0000 (08:45 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 25 May 2010 08:45:44 +0000 (08:45 +0000)
loading a script as client. Closes #238345.

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

coregrind/m_ume/script.c

index 44359f417fac17b9c509a7cc018761504a15181e..13ca99192defe1675f0a406d4d5a4ae48d8c7a2c 100644 (file)
@@ -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);