diff mbox

[4/4] linux-user: pass strace argument in execve

Message ID 1464192472-7885-5-git-send-email-joel.holdsworth@vcatechnology.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joel Holdsworth May 25, 2016, 4:07 p.m. UTC
---
 linux-user/syscall.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index fb75c09..314a890 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5966,6 +5966,8 @@  static abi_long qemu_execve(char *filename, char *argv[],
     argc += undef_envc * 2;
 
     /* allocate the argument list */
+    if (do_strace)
+        qemu_argc++;
     argp = qemu_argp = alloca((qemu_argc + 1) * sizeof(void *));
 
     /* set up the qemu arguments */
@@ -5973,6 +5975,9 @@  static abi_long qemu_execve(char *filename, char *argv[],
     *argp++ = strdup("-L");
     *argp++ = strdup(path("/"));
 
+    if (do_strace)
+        *argp++ = strdup("-strace");
+
     /* add arguments for the enironment variables */
     for (i = 0; i < def_envc; i++) {
         *argp++ = strdup("-E");