From patchwork Tue Jun 14 19:26:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Holdsworth X-Patchwork-Id: 9176725 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 C788660772 for ; Tue, 14 Jun 2016 19:30:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA70528047 for ; Tue, 14 Jun 2016 19:30:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE1BB2823D; Tue, 14 Jun 2016 19:30:29 +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 35E4928047 for ; Tue, 14 Jun 2016 19:30:28 +0000 (UTC) Received: from localhost ([::1]:37681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCu2e-0005zY-42 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 14 Jun 2016 15:30:28 -0400 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) 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=0H9tNoxrkU6+Fu8wqMWNSdvbGsFD9KoM1InjvwvAG9U=; b=RQ8JBFWED7J8LwDpdg79ou5Ar/F3/5W1dDYeIf84jbfbShqqxzFo41joc/6OToLdhh k5rO9el6JvnP2IUWQI7NY/cdaJ+nWBst0lzbgz2nH59fFAtgS3wAMAYznBtjEbg6lg8U QWE8eHZYPzyiqPxB/eaioGBnTdgQMtAheJLow33BAyy0VchxIAZuFaeduqjgDDRQ9sAy azI4la1ibkIUkfOnV+evDWaqZM3hBPSps2YVK3q9OeWUw6Qqfvy5iDsaRuIPJaxWbn25 YYouq0Ut95AOnLZCBaKagPeq1GKoYqv83Y/AtqHTP6+LEPZNPzY+Gsx47skd0kREzKYg Zhag== 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=0H9tNoxrkU6+Fu8wqMWNSdvbGsFD9KoM1InjvwvAG9U=; b=ACthu6msRO/fjZgwErAtPIn5J61YSTP4BOuWlIsvc2CAH6s7LIDUKgIiE3rdX8rovO Y2B0GPXDbLer0a3iBAb5w1sajd7p5RNgQiQ31ZLg/e6vWM421FXmV/bLhD1F59uCISuz UHlh9L/ZwzO2JccKrgvmksm4NXMzBHpc+Th82hqbxW6llOdX3hBFgEjRrkDAg++NkL1a cylvUgaZwVCx7LsmoDYesaJJvT5DPe23Va0RDqjeLEwmxWC05lQ40dfg/GFNU3LQmXrn bwxJtL1XBRRYCImjIdEKeKDL7SfVF0+iUu4HFBkepV7KTIttMKzHLFg1tVidewbjpxqY jB5Q== X-Gm-Message-State: ALyK8tJe3215fS24NQRU2zEV8AWsT48AxAUXPuNlV+tDirDI+0NrUmSjtHZA60csKtfZ5inw X-Received: by 10.107.189.6 with SMTP id n6mr37538910iof.41.1465932394145; Tue, 14 Jun 2016 12:26:34 -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 w10sm2509039itc.1.2016.06.14.12.26.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Jun 2016 12:26:33 -0700 (PDT) From: Joel Holdsworth To: qemu-devel@nongnu.org Date: Tue, 14 Jun 2016 20:26:22 +0100 Message-Id: <1465932382-28645-5-git-send-email-joel.holdsworth@vcatechnology.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465932382-28645-1-git-send-email-joel.holdsworth@vcatechnology.com> References: <1465932382-28645-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:c06::22c Subject: [Qemu-devel] [PATCH v2 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 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");