]> granicus.if.org Git - strace/blobdiff - strace.c
tests: check decoding of vcpu auxstr
[strace] / strace.c
index 4f41a25960f320fcf0fb96fb55e133db8feec6b9..467e8a6eb9609b72cf5143fd8f2a8e00c5a45103 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -278,7 +278,11 @@ Statistics:\n\
 \n\
 Filtering:\n\
   -e expr        a qualifying expression: option=[!]all or option=[!]val1[,val2]...\n\
-     options:    trace, abbrev, verbose, raw, signal, read, write, fault\n\
+     options:    trace, abbrev, verbose, raw, signal, read, write, fault"
+#ifdef HAVE_LINUX_KVM_H
+              ", kvm"
+#endif
+"\n\
   -P path        trace accesses to path\n\
 \n\
 Tracing:\n\
@@ -421,7 +425,8 @@ set_cloexec_flag(int fd)
        if (flags == newflags)
                return;
 
-       fcntl(fd, F_SETFD, newflags); /* never fails */
+       if (fcntl(fd, F_SETFD, newflags)) /* never fails */
+               perror_msg_and_die("fcntl(%d, F_SETFD, %#x)", fd, newflags);
 }
 
 static void
@@ -818,7 +823,12 @@ droptcb(struct tcb *tcp)
                unwind_tcb_fin(tcp);
 #endif
 
-       mmap_cache_delete(tcp, __func__);
+#ifdef HAVE_LINUX_KVM_H
+       kvm_vcpu_info_free(tcp);
+#endif
+
+       if (tcp->mmap_cache)
+               tcp->mmap_cache->free_fn(tcp, __func__);
 
        nprocs--;
        debug_msg("dropped tcb for pid %d, %d remain", tcp->pid, nprocs);