]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Show Valgrind's args too in the XML output.
authorJulian Seward <jseward@acm.org>
Tue, 19 Jul 2005 12:39:11 +0000 (12:39 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 19 Jul 2005 12:39:11 +0000 (12:39 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4183

README_XML_OUTPUT.txt
coregrind/m_main.c

index b6852c855f4df04b6fcb3be441648931d3e82259..60a239f0254eb643c35f90aa023a12fbdfb57e81 100644 (file)
@@ -142,12 +142,20 @@ following in sequence:
   That is, both the name of the environment variable and its value
   are given.
 
-* The program and args being run.
-
-     <argv>
-       <exe>TEXT</exe>
-       <arg>TEXT</arg> (zero or more of)
-     </argv>
+* The program and args: first those pertaining to Valgrind itself, and
+  then those pertaining to the program to be run under Valgrind (the
+  client):
+
+     <args>
+       <vargv>
+         <exe>TEXT</exe>
+         <arg>TEXT</arg> (zero or more of)
+       </vargv>
+       <argv>
+         <exe>TEXT</exe>
+         <arg>TEXT</arg> (zero or more of)
+       </argv>
+     </args>
 
 * The following, indicating that the program has now started:
 
index 99e12370ca063b88512f74686d1d4de0e35b638d..acf024a66629e26a1f5f05bda5d198e3d711496a 100644 (file)
@@ -1906,13 +1906,22 @@ static void process_cmd_line_options( UInt* client_auxv, const char* toolname )
                                   val ? val : "");
       }
       VG_(message)(Vg_UserMsg, "");
-      VG_(message)(Vg_UserMsg, "<argv>");   
+      VG_(message)(Vg_UserMsg, "<args>");
+      VG_(message)(Vg_UserMsg, "  <vargv>");
+      for (i = 0; i < vg_argc; i++) {
+         HChar* tag = i==0 ? "exe" : "arg";
+         VG_(message)(Vg_UserMsg, "    <%s>%s</%s>", 
+                                  tag, vg_argv[i], tag);
+      }
+      VG_(message)(Vg_UserMsg, "  </vargv>");
+      VG_(message)(Vg_UserMsg, "  <argv>");
       for (i = 0; i < VG_(client_argc); i++) {
          HChar* tag = i==0 ? "exe" : "arg";
-         VG_(message)(Vg_UserMsg, "  <%s>%s</%s>", 
+         VG_(message)(Vg_UserMsg, "    <%s>%s</%s>", 
                                   tag, VG_(client_argv)[i], tag);
       }
-      VG_(message)(Vg_UserMsg, "</argv>");   
+      VG_(message)(Vg_UserMsg, "  </argv>");
+      VG_(message)(Vg_UserMsg, "</args>");
    }
 
    if (VG_(clo_verbosity) > 1) {