]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
VG_(show_open_fds) Only emit empty line when not creating xml output
authorMark Wielaard <mark@klomp.org>
Wed, 24 Apr 2024 11:20:34 +0000 (13:20 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 24 Apr 2024 11:20:39 +0000 (13:20 +0200)
The "empty" line containing '== pid == ' would corrupt the xml output
with --track-fds=yes.

coregrind/m_syswrap/syswrap-generic.c

index 625cd639ef5631bf5129ff719539906bcb17b0ee..0c0f67602b9c0af28231a242ce62dc90fa1335e7 100644 (file)
@@ -989,7 +989,8 @@ void VG_(show_open_fds) (const HChar* when)
 
    }
 
-   VG_(message)(Vg_UserMsg, "\n");
+   if (!VG_(clo_xml))
+      VG_(message)(Vg_UserMsg, "\n");
 }
 
 /* If /proc/self/fd doesn't exist (e.g. you've got a Linux kernel that doesn't