From patchwork Mon Mar 10 12:22:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 25961 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 09DC82055F for ; Mon, 10 Mar 2014 12:26:06 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id cz12sf18056650veb.2 for ; Mon, 10 Mar 2014 05:26:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=+cb9kKxzbO1owkqoXo6FPXrSplNzm5OEq72YZZadY6g=; b=e5sSDiKtB4rWpgHK0FxY0VDzGbDMAwAB2OgsmsoeME6xf0Sj5kg/0KODCuFB4CHqjl sI73lW/OH5xCoGGy+h4mM2Egh3ThtSJLngtzDadK5tC17UTPG8H3DKaNbVevDCGGDP4L RlzGFk81HM05NKoXdBOGQAtqoPRfjpfymbYiGF5iPJb3sjlAqniCoOIjgU1M9jQVRR0w VTZt97wuVSjoAqavTilDmooo4rB6IQ9g5aPmVzFDQgiLUHmNQG41rp/Mkz6UzJFY0WaN zfygN0tQ3mVcV77QuAnkqwUvZoRc7/MOICAxztBh09ODDrs/YrBPzF2c2mjmrD0HleD5 OfAg== X-Gm-Message-State: ALoCoQley6e0/rSmbEsneUwvOdxcJjvID86nrPn3YDXS7yrFa/Mxzc/sMJ2xqbkyBgm4vNrn7qlE X-Received: by 10.236.83.112 with SMTP id p76mr11721040yhe.51.1394454366772; Mon, 10 Mar 2014 05:26:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.35 with SMTP id 32ls1995767qgu.80.gmail; Mon, 10 Mar 2014 05:26:06 -0700 (PDT) X-Received: by 10.52.166.103 with SMTP id zf7mr1764379vdb.30.1394454366642; Mon, 10 Mar 2014 05:26:06 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id uw4si5314901vdc.144.2014.03.10.05.26.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Mar 2014 05:26:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so6859444veb.20 for ; Mon, 10 Mar 2014 05:26:06 -0700 (PDT) X-Received: by 10.58.77.204 with SMTP id u12mr506553vew.29.1394454366575; Mon, 10 Mar 2014 05:26:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp114737vck; Mon, 10 Mar 2014 05:26:06 -0700 (PDT) X-Received: by 10.224.172.4 with SMTP id j4mr2376896qaz.85.1394454366172; Mon, 10 Mar 2014 05:26:06 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d8si5061886qao.0.2014.03.10.05.26.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Mar 2014 05:26:06 -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; Received: from localhost ([::1]:48414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMzHR-0007yT-MR for patch@linaro.org; Mon, 10 Mar 2014 08:26:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMzEg-0002rW-Mj for qemu-devel@nongnu.org; Mon, 10 Mar 2014 08:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMzEW-00084p-2K for qemu-devel@nongnu.org; Mon, 10 Mar 2014 08:23:14 -0400 Received: from afflict.kos.to ([92.243.29.197]:50051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMzEV-00084S-GK for qemu-devel@nongnu.org; Mon, 10 Mar 2014 08:23:03 -0400 Received: from localhost.localdomain (afflict [92.243.29.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id E3B4426567; Mon, 10 Mar 2014 13:23:01 +0100 (CET) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 10 Mar 2014 14:22:59 +0200 Message-Id: X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: peter.maydell@linaro.org, Petar Jovanovic Subject: [Qemu-devel] [PATCH 7/8] linux-user: correct handling of break exception for MIPS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Petar Jovanovic Exception with break instruction has not been correctly propagated as SIGTRAP. This resolves crash issues with examples that use break instruction on MIPS. Signed-off-by: Petar Jovanovic Signed-off-by: Riku Voipio --- linux-user/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 9192977..c19e7fb 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -2384,6 +2384,10 @@ static int do_break(CPUMIPSState *env, target_siginfo_t *info, ret = 0; break; default: + info->si_signo = TARGET_SIGTRAP; + info->si_errno = 0; + queue_signal(env, info->si_signo, &*info); + ret = 0; break; }