From patchwork Tue Sep 11 21:29:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 10596339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE1C514E5 for ; Tue, 11 Sep 2018 21:31:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B559629C2C for ; Tue, 11 Sep 2018 21:31:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A867E29C6C; Tue, 11 Sep 2018 21:31:18 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 0A62229C2C for ; Tue, 11 Sep 2018 21:31:17 +0000 (UTC) Received: from localhost ([::1]:59623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzqFg-00081L-Rt for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Sep 2018 17:31:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzqEx-0007iQ-33 for qemu-devel@nongnu.org; Tue, 11 Sep 2018 17:30:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzqEt-0006vg-QO for qemu-devel@nongnu.org; Tue, 11 Sep 2018 17:30:30 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:58047) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzqEr-0006W8-3o for qemu-devel@nongnu.org; Tue, 11 Sep 2018 17:30:26 -0400 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1fzqEZ-0006ut-T0 from Sandra_Loosemore@mentor.com ; Tue, 11 Sep 2018 14:30:07 -0700 Received: from SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 11 Sep 2018 14:30:05 -0700 Received: from build2-trusty-cs (147.34.91.1) by SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) with Microsoft SMTP Server id 15.0.1320.4 via Frontend Transport; Tue, 11 Sep 2018 14:30:05 -0700 Received: by build2-trusty-cs (Postfix, from userid 49998) id BE51642804F; Tue, 11 Sep 2018 14:30:01 -0700 (PDT) From: Sandra Loosemore To: Date: Tue, 11 Sep 2018 14:29:39 -0700 Message-ID: <1536701379-106032-1-git-send-email-sandra@codesourcery.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 Subject: [Qemu-devel] [PATCH] Fix breakpoints in nios2 user-mode emulation. 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: marex@denx.de, Sandra Loosemore , crwulff@gmail.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Without this patch, QEMU exits immediately when it execution stops at a breakpoint, instead of reporting it to GDB. Signed-off-by: Sandra Loosemore Reviewed-by: Richard Henderson --- linux-user/nios2/cpu_loop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c index dac7a06..a5ae37f 100644 --- a/linux-user/nios2/cpu_loop.c +++ b/linux-user/nios2/cpu_loop.c @@ -71,6 +71,9 @@ void cpu_loop(CPUNios2State *env) gdbsig = TARGET_SIGTRAP; break; } + case EXCP_DEBUG: + gdbsig = TARGET_SIGTRAP; + break; case 0xaa: switch (env->regs[R_PC]) { /*case 0x1000:*/ /* TODO:__kuser_helper_version */