Index: coregrind/m_main.c
===================================================================
--- coregrind/m_main.c	(revision 10828)
+++ coregrind/m_main.c	(working copy)
@@ -1047,15 +1047,17 @@
       // printed a '\' as a line joiner, but that makes it hard to cut and
       // paste the command line (because of the "==pid==" prefixes), so we now
       // favour utility and simplicity over aesthetics.
-      umsg_or_xml("%sCommand: ", xpre);
-      if (VG_(args_the_exename))
-         umsg_or_xml_arg(VG_(args_the_exename), umsg_or_xml);
-      for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
-         HChar* s = *(HChar**)VG_(indexXA)( VG_(args_for_client), i );
-         umsg_or_xml(" ");
-         umsg_or_xml_arg(s, umsg_or_xml);
+      if (!VG_(clo_xml)) {
+	  umsg_or_xml("%sCommand: ", xpre);
+	  if (VG_(args_the_exename)) 
+	      umsg_or_xml_arg(VG_(args_the_exename), umsg_or_xml);
+	  for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
+	      HChar* s = *(HChar**)VG_(indexXA)( VG_(args_for_client), i );
+	      umsg_or_xml(" ");
+	      umsg_or_xml_arg(s, umsg_or_xml);
+	  }
+	  umsg_or_xml("%s\n", xpost);
       }
-      umsg_or_xml("%s\n", xpost);
 
       if (VG_(clo_xml))
          VG_(printf_xml)("</preamble>\n");
