From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCtyz-0002RG-0y for qemu-devel@nongnu.org; Tue, 14 Jun 2016 15:26:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCtys-00026U-KD for qemu-devel@nongnu.org; Tue, 14 Jun 2016 15:26:39 -0400 Received: from mail-io0-x22c.google.com ([2607:f8b0:4001:c06::22c]:35245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCtys-00026P-GB for qemu-devel@nongnu.org; Tue, 14 Jun 2016 15:26:34 -0400 Received: by mail-io0-x22c.google.com with SMTP id o127so3623905iod.2 for ; Tue, 14 Jun 2016 12:26:34 -0700 (PDT) From: Joel Holdsworth Date: Tue, 14 Jun 2016 20:26:22 +0100 Message-Id: <1465932382-28645-5-git-send-email-joel.holdsworth@vcatechnology.com> In-Reply-To: <1465932382-28645-1-git-send-email-joel.holdsworth@vcatechnology.com> References: <1465932382-28645-1-git-send-email-joel.holdsworth@vcatechnology.com> Subject: [Qemu-devel] [PATCH v2 4/4] linux-user: pass strace argument in execve List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Vasileios.Kalintiris@imgtec.com, riku.voipio@iki.fi, Joel Holdsworth --- linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1513f0f..00ee7a6 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6778,6 +6778,8 @@ static abi_long qemu_execve(char *filename, char *argv[], qemu_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 */ @@ -6785,6 +6787,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"); -- 1.9.1