From patchwork Wed May 25 16:07:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Holdsworth X-Patchwork-Id: 9135703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 52E196075C for ; Wed, 25 May 2016 16:07:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4397C28249 for ; Wed, 25 May 2016 16:07:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38799282BB; Wed, 25 May 2016 16:07:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 21D2828249 for ; Wed, 25 May 2016 16:07:18 +0000 (UTC) Received: from localhost ([::1]:33860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5bL3-0004wj-P5 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 May 2016 12:07:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5bKY-0004um-U3 for qemu-devel@nongnu.org; Wed, 25 May 2016 12:06:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5bKW-0002pF-Th for qemu-devel@nongnu.org; Wed, 25 May 2016 12:06:45 -0400 Received: from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]:34090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5bKW-0002p8-Pn for qemu-devel@nongnu.org; Wed, 25 May 2016 12:06:44 -0400 Received: by mail-it0-x22a.google.com with SMTP id g126so7020600ite.1 for ; Wed, 25 May 2016 09:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vcatechnology-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BQsMt9PNdB5X05bbYbdm6mqxbIy7cbPlEkhG1YcM9jA=; b=D7b1qLe6DsYtYUH3op65lyjPq8i1Sgj0snW57cglv+PtNw3zMlswqLDxEaPLOKtz1x 1F7hVEdaCAXlCF2BCYvJeyYflw4x4WdtSqvEHmWjNtrSIJOOOsyqMYBBMfOSEkblcbzv Sj6ltaYtRkEYYqJJOS83PeydymrcC1QfxLtbBmm080a2Py7hIvKHeT04/M0JCD4VMKDN DWsMVpqZaNf6WB7FGxv9hBuTNb8nMTOWcrQ982USc7SYvJFc08Kc40dizaq83sRK8NB5 QNLQWrQU6f8oxg6buQUlNPjc60/812eJ/PhO68qSi8CEx/5faeTC41AYjqcd0zlu1D+Z Wyxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BQsMt9PNdB5X05bbYbdm6mqxbIy7cbPlEkhG1YcM9jA=; b=DYkSveYmwqa8aCWj8HdHPmXLuOKHPHObA5rt2Mabli4zmDDH5r3E1f88ah6G8Kwdec TeOTR/tKuH8voR7JyS/7b7KDGjySNZ2YhqGOXXRwqPHBzNvsr35DNqmIkM9WdSUmis/6 qk9le4wX989VnhgJdyZZqNSrIa4T9JG3Q2OsSZs3uPI43EeH26UBmk8uNzP+gtJjWK0g r5SfL28Qr6CJZ0KEK/DRK7gFrodwQx3569PYr7ulZSocDg3SU4Si8RvrhDW0PKtiNuRc JWJn+QKNzRblkd1RkUBIvbGDGZy7glCdljQgkidYK15DZTAiRrcMqcRLLBX/x+c//NPL UApg== X-Gm-Message-State: ALyK8tLaAlPOfA6JbVCuPVopwf4hGBE/8zKBrOH3T5vdAq9k74eNIrJAh5dXpknf9dqHv8Jb X-Received: by 10.36.144.131 with SMTP id x125mr4372771itd.62.1464192404366; Wed, 25 May 2016 09:06:44 -0700 (PDT) Received: from localhost.localdomain (50-205-134-174-static.hfc.comcastbusiness.net. [50.205.134.174]) by smtp.googlemail.com with ESMTPSA id d196sm2975958ioe.41.2016.05.25.09.06.43 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2016 09:06:43 -0700 (PDT) From: Joel Holdsworth To: qemu-devel@nongnu.org Date: Wed, 25 May 2016 17:07:52 +0100 Message-Id: <1464192472-7885-5-git-send-email-joel.holdsworth@vcatechnology.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464192472-7885-1-git-send-email-joel.holdsworth@vcatechnology.com> References: <1464192472-7885-1-git-send-email-joel.holdsworth@vcatechnology.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c0b::22a Subject: [Qemu-devel] [PATCH 4/4] linux-user: pass strace argument in execve X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: riku.voipio@iki.fi, Vasileios.Kalintiris@imgtec.com, Joel Holdsworth Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP --- 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");