qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Joel Holdsworth <joel.holdsworth@vcatechnology.com>
To: qemu-devel@nongnu.org
Cc: Vasileios.Kalintiris@imgtec.com, riku.voipio@iki.fi,
	Joel Holdsworth <joel.holdsworth@vcatechnology.com>
Subject: [Qemu-devel] [PATCH v2 4/4] linux-user: pass strace argument in execve
Date: Tue, 14 Jun 2016 20:26:22 +0100	[thread overview]
Message-ID: <1465932382-28645-5-git-send-email-joel.holdsworth@vcatechnology.com> (raw)
In-Reply-To: <1465932382-28645-1-git-send-email-joel.holdsworth@vcatechnology.com>

---
 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

  parent reply	other threads:[~2016-06-14 19:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 19:26 [Qemu-devel] linux-user: add option to intercept execve() syscalls Joel Holdsworth
2016-06-14 19:26 ` [Qemu-devel] [PATCH v2 1/4] " Joel Holdsworth
2016-06-15 19:31   ` Laurent Vivier
2016-06-20 20:04     ` Joel Holdsworth
2016-06-14 19:26 ` [Qemu-devel] [PATCH v2 2/4] linux-user: pass environment arguments in execve Joel Holdsworth
2016-06-15 19:59   ` Laurent Vivier
2016-06-20 19:51     ` Joel Holdsworth
2016-06-20 20:29       ` Laurent Vivier
2016-06-20 21:27         ` Joel Holdsworth
2016-06-20 21:40           ` Peter Maydell
2016-06-20 22:15             ` Joel Holdsworth
2016-06-20 22:54               ` Peter Maydell
2016-06-14 19:26 ` [Qemu-devel] [PATCH v2 3/4] linux-user: pass elf interpreter prefix " Joel Holdsworth
2016-06-15 20:06   ` Laurent Vivier
2016-06-20 19:57     ` Joel Holdsworth
2016-06-14 19:26 ` Joel Holdsworth [this message]
2016-06-15 20:37   ` [Qemu-devel] [PATCH v2 4/4] linux-user: pass strace argument " Laurent Vivier
2016-06-20 20:02     ` Joel Holdsworth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465932382-28645-5-git-send-email-joel.holdsworth@vcatechnology.com \
    --to=joel.holdsworth@vcatechnology.com \
    --cc=Vasileios.Kalintiris@imgtec.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).