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 4/4] linux-user: pass strace argument in execve
Date: Wed, 25 May 2016 17:07:52 +0100 [thread overview]
Message-ID: <1464192472-7885-5-git-send-email-joel.holdsworth@vcatechnology.com> (raw)
In-Reply-To: <1464192472-7885-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 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");
--
1.9.1
next prev parent reply other threads:[~2016-05-25 16:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 16:07 [Qemu-devel] linux-user: add option to intercept execve() syscalls Joel Holdsworth
2016-05-25 16:07 ` [Qemu-devel] [PATCH 1/4] " Joel Holdsworth
2016-05-25 16:07 ` [Qemu-devel] [PATCH 2/4] linux-user: pass environment arguments in execve Joel Holdsworth
2016-05-25 16:07 ` [Qemu-devel] [PATCH 3/4] linux-user: pass elf interpreter prefix " Joel Holdsworth
2016-05-25 16:07 ` Joel Holdsworth [this message]
2016-05-30 7:52 ` [Qemu-devel] linux-user: add option to intercept execve() syscalls Riku Voipio
2016-05-31 15:59 ` 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=1464192472-7885-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).