From patchwork Mon Jun 19 10:46:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 105819 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp809973qgd; Mon, 19 Jun 2017 03:49:39 -0700 (PDT) X-Received: by 10.159.51.74 with SMTP id a10mr11442804uac.44.1497869379309; Mon, 19 Jun 2017 03:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497869379; cv=none; d=google.com; s=arc-20160816; b=lYQPRuew1Uz/ezbEd+eKHH9PMHTpycaPNLsIMYhGq8+BdTLb2P77gzcHoCAPOGlTDp s9BAEopuEyA5d2AFmb63fam8QdvaR+PwXvxxvXwUMFLo+6VHORnp/Q8JKxbUeZfkytbJ 8j80G3+89B+21Xwjfolv8Vn2064Rd3gU0i1XWzisaDxkXQyKJiw9SLDoYF0LxkBbtFj6 81Be7OnstfkPKoKyWwJ+f3HtHUoFLqaV2FqEzPeanz0i/Hle1EZo6uPOf+MrVObXc4L2 05aFgrRTXfpiouJ7ck9ZWPp5Y1ORd1qcidu2yVLigLuYx35oJq9WCXF3AvQVyhZsGW8J fZgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=G0jYWQl98Xzhmjtst8ebkQ7kBgF2b2Ech4GOnB9rk1c=; b=BbVpt0oIXJA/rjx2sxnhnwC540hHLr5D4cblM/O9jecH4SmGDz6Y+U/Kej47xnCvY+ cTUKigmjHgAxP85uQ54tXx4y6+ZJZF2wNnvgmXrfnycdgTj1da84ML9K82KpD0Nk13ly WwGCbePblCroSeWFqUEfbDw3LjGzHFtxMy343lq9l4eV2mwY8EODuSYtJbcDO6pg/oZd DWo4FSMsxTDmxPH1zPJ9rmLiMD3Phf1q1vmde0uVYlo1jQSGp5PdCMxUrfmJ+kN8RD1L 7LzuHVOVzk/4x6DDbKORojmrss7xdW/ZShdDGyeukqzEIKAuecld13VhJnBH5zz460L9 aoAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=aHQ8B0D9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id e188si4972507vka.19.2017.06.19.03.49.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 19 Jun 2017 03:49:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.b=aHQ8B0D9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuFW-0001e1-PO for patch@linaro.org; Mon, 19 Jun 2017 06:49:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMuCS-0007L5-3c for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:46:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMuCR-0004sh-0s for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:46:28 -0400 Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]:36326) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMuCQ-0004ru-Qj for qemu-devel@nongnu.org; Mon, 19 Jun 2017 06:46:26 -0400 Received: by mail-wr0-x22d.google.com with SMTP id c11so14026259wrc.3 for ; Mon, 19 Jun 2017 03:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G0jYWQl98Xzhmjtst8ebkQ7kBgF2b2Ech4GOnB9rk1c=; b=aHQ8B0D90kpYyxro2h4Qzqx67ZFHAKOGtdTwXAmDMOcXG/vj4HKM3wOfN52sl9SmOq JcZOcIOtMSRYCpvsociMwtB+fPBjU9EGjkHKg+qrGEj1rAI8xPm5WGEQxBBqPl2NItRt 6LZk6qV45v0nmVJS9o84AHLvGT72qqr4Tjhgo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G0jYWQl98Xzhmjtst8ebkQ7kBgF2b2Ech4GOnB9rk1c=; b=DaERRO08agczgbFVnMHfqOhINkzlS1neu/DeXcZWszizEG47sHa+KJBRTcVaFvEM+R W3PlgZcBxzzVtwnb7Fo8GWZjJmdE9hfQrpZ+FPU3w3xdrlEf7cf0a7uflGQBr5JfqSeM uLOnLCxM2byay8a+vS2G99Slbl+eKpppUOxKk3SyvCsbTNKoGh/aqEqHIlbxK6MdbtUd BtL/+7bdx2qRCTkirf1svckdZne20JQ48xdarlC+87wSwU9Gibm9kWc004Q2NWYkbdae 4xnlX6HJcNF10p/gZDKgDdaWpWvpaHBn/zoFLXacxJVNClrj5mlWlQjIsNYHe8BzJclt Mj/g== X-Gm-Message-State: AKS2vOwRvvIsvP9J8cZqf9XzJ6ibcQL8xjxC1noE6ErLzWx0yMS4tl54 ZBKT8msnZda06zAn X-Received: by 10.223.181.135 with SMTP id c7mr15840869wre.150.1497869185717; Mon, 19 Jun 2017 03:46:25 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m143sm10070951wmg.27.2017.06.19.03.46.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 03:46:23 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 527CD3E0BC5; Mon, 19 Jun 2017 11:47:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Mon, 19 Jun 2017 11:46:48 +0100 Message-Id: <20170619104655.31104-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170619104655.31104-1-alex.bennee@linaro.org> References: <20170619104655.31104-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22d Subject: [Qemu-devel] [RISU PATCH v5 06/13] risu: a bit more verbosity when starting 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When debugging faults it is useful to know where the generated instructions are living. Signed-off-by: Alex Bennée -- v5 - dropped all the status update due to signal handler contraints v3 - use portable fmt string for image_start_address - include arm dumping position --- risu.c | 4 ++++ risu.h | 3 +++ 2 files changed, 7 insertions(+) -- 2.13.0 diff --git a/risu.c b/risu.c index 2cd6d22..a10422a 100644 --- a/risu.c +++ b/risu.c @@ -124,6 +124,8 @@ int master(int sock) } master_socket = sock; set_sigill_handler(&master_sigill); + fprintf(stderr, "starting master image at 0x%"PRIxPTR"\n", + image_start_address); fprintf(stderr, "starting image\n"); image_start(); fprintf(stderr, "image returned unexpectedly\n"); @@ -134,6 +136,8 @@ int apprentice(int sock) { apprentice_socket = sock; set_sigill_handler(&apprentice_sigill); + fprintf(stderr, "starting apprentice image at 0x%"PRIxPTR"\n", + image_start_address); fprintf(stderr, "starting image\n"); image_start(); fprintf(stderr, "image returned unexpectedly\n"); diff --git a/risu.h b/risu.h index 3fbeda8..78a7313 100644 --- a/risu.h +++ b/risu.h @@ -37,6 +37,7 @@ extern uintptr_t image_start_address; extern void *memblock; extern int test_fp_exc; +extern int ismaster; /* Ops code under test can request from risu: */ #define OP_COMPARE 0 @@ -72,6 +73,8 @@ int recv_and_compare_register_info(int sock, void *uc); */ int report_match_status(void); +void report_test_status(void *pc); + /* Interface provided by CPU-specific code: */ /* Move the PC past this faulting insn by adjusting ucontext