From patchwork Sun May 26 07:45:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis V. Lunev\" via" X-Patchwork-Id: 10961405 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 1E5131395 for ; Sun, 26 May 2019 08:01:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FDE528A85 for ; Sun, 26 May 2019 08:01:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F26D828AA4; Sun, 26 May 2019 08:01:11 +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=-3.5 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FORGED_MSGID_YAHOO,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9F3FB28A85 for ; Sun, 26 May 2019 08:01:11 +0000 (UTC) Received: from localhost ([127.0.0.1]:52164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUo5e-0001QC-VL for patchwork-qemu-devel@patchwork.kernel.org; Sun, 26 May 2019 04:01:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUo4E-0008LP-MJ for qemu-devel@nongnu.org; Sun, 26 May 2019 03:59:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUnsZ-0005aQ-Us for qemu-devel@nongnu.org; Sun, 26 May 2019 03:47:40 -0400 Received: from sonic304-46.consmr.mail.sg3.yahoo.com ([106.10.242.236]:39779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hUnsY-0005YX-8A for qemu-devel@nongnu.org; Sun, 26 May 2019 03:47:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1558856852; bh=h9lJAUyyyDlRjzeGFvmdpGDGbP/+clu4dXEDohXQDzI=; h=From:To:Cc:Subject:Date:From:Subject; b=i8hSTve/gP1fqpJE+0zb7UaSICgBBNgQjZY3maRkkampOVWNxg/02GnjYcKOOT5gdcbXBo40hFsbYn/NH8Hj4t+oj3Y/cu4YTpBY3BasV5Qhl3oxyIBLnVnpOKoa4iPCBXaeSQ0mCY0NMpbg9nVRcrKBrRa+p5Dm2neFD3ik/HM+zJtXuaU8FUFqeScc/Vagc5pYM530WlQO+5SZUQ0R/BFg2AO6LjvZuVLbVrJgmI3e2tgbPlYS5fvFnm+Kq4/4j/Y1WjISNGThHLfydafRHk19FAsdC4sVjyx5uanFlgCUvtG+PzOffV1SQwuJhCe8KY+o7H/Dvad68hkphRiyiQ== X-YMail-OSG: sENCgDAVM1mSNY.agDYZ0MoWkVuFTosqpxCA14flrzrxWxEokHQFrqSk.hMK0SO Olh2vk9SsQY406fAPvTR14hPU3.y1Dj6n8e.9GZ4fDTnIcX20hGTCr5rHLaJHRZIepr.cz0sqv7g J.HQUcq0UvRlzOs59zKNST1aGd8Rx_CqL8j5pWwFEWxQgIhBJPLM6JZeiSJNy0FQaCjcUGPgqynp ih6Ljo_HIIZgL5hkHR1I3JXGCK0dJNhqzmy0PlwQJzp4jtq.2N30YSdKxGLXTQ4fpfmWugEP9ZPq sLKlsDCnWEyRPFbbbD6OMCMGc2Ncxv3xf4q57FnHh8TlHPNNeT6GYtOBqoCZ2GZyqQJ5u4BHIxu1 rAZxz8VW.vAanspdrxowUQeV3uivN.0MV_eE_5ael8sbQAzixUbj9KqBJ9LTU5_Xl.xFFz_yFoWA .WfKofLLuGWaSGYaFXAHh_vk15KCXzwkkKHshoQcaVA8rHuGpxR5IyCrMN8VtRQVtk_lUF0DiKzE 1R.JcxH84bw.RUDt.pMp90pfUP7qiqZFLZxdDncg5VSEtJ0x7zK_c3YZIFcqHQuOkkCFm.Hde1iX M7o4Apbry6lmUH6zNUZPai4Vx4au4cv5_UK.aMjoETrHIExrbrYiWcYD3dQ59c7Xqyas0aPreedU S4YpPMNAXumRKhqF9klsttWLbFEbalExpqaBWYe7xkkVVrCwJkJUc80vRrgwv8qTLzumUxipoHZG zAZ8ExRu5po8RCqlLswLDbIQkkskG1bmnyrWoABTkCIosIprN0kqD3U4hNsiQoFITIwrqJ3TSQr. UUBqIr1Pehim8MWgo_bjoIzaPK.097Lt75HveWPqGDj5H4_KzBYlQQNxeL9UjPXeO27IuWI8RhzH IIQkmrlqe7q6aCG.xAMoFUX3gntmXnt4et__xYRVADZIRwhGyk_SVi43jVf7PFxxwr9yak1Z2BiN fSrwfGy1GQFgQt8pjNX8NrMobVtkLfUJq0RO6sewZmrVEniL8Zbbcx7Ex63hMoMoNDYcHfHijtxG z9O0eHlltrN631oZPsrlD4WAaKkAjh9AGTWbr_gLoD_aB5IvYbmoFSrW41G6lvOfvjQzwI6eaZ.S NrVeB7wDDVKmUStWOWi9O6Vn7vHVumgokell7h8OXA2_vnpzbfxW7DtG_dWFkS3P9taAh5ZtNLbx IHAVz6E5Ztg_YkBpL1yfZrrQK8nyQPiAbFDfW_2KfVJRBkhWMk.y9TS50Tpt1U6VMAcIoc9uO7Th XY9hchdhvi7L535gbrtTFtyhj3huICvlcyfgaK2MLUKTXD5226ovAoRRIYTbzPwFniVADGhPB Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.sg3.yahoo.com with HTTP; Sun, 26 May 2019 07:47:32 +0000 Received: from pl35138.ag1212.nttpc.ne.jp (EHLO localhost.localdomain) ([133.232.247.66]) by smtp424.mail.sg3.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 3374f1a399936d92882ce880a6210ec2; Sun, 26 May 2019 07:45:31 +0000 (UTC) To: qemu-devel@nongnu.org Date: Sun, 26 May 2019 16:45:27 +0900 Message-Id: <20190526074527.33632-1-lucienmp_antispam@yahoo.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 106.10.242.236 Subject: [Qemu-devel] [PATCH] The m68k gdbstub SR reg request doesnt include Condition-Codes 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: , X-Patchwork-Original-From: Lucien Murray-Pitts via Qemu-devel From: "Denis V. Lunev\" via" Reply-To: Lucien Murray-Pitts Cc: Thomas Huth , Richard Henderson , Laurent Vivier , "Emilio G . Cota" , lucienmp_antispam@yahoo.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Luc Michel Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The register request via gdbstub would return the SR part which contains the Trace/Master/IRQ state flags, but would be missing the CR (Condition Register) state bits. This fix adds this support by merging them in the m68k specific gdbstub handler Signed-off-by: Lucien Murray-Pitts Reviewed-by: Laurent Vivier --- target/m68k/gdbstub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/m68k/gdbstub.c b/target/m68k/gdbstub.c index fd2bb46c42..f092044883 100644 --- a/target/m68k/gdbstub.c +++ b/target/m68k/gdbstub.c @@ -35,8 +35,10 @@ int m68k_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n) return gdb_get_reg32(mem_buf, env->aregs[n - 8]); } else { switch (n) { - case 16: - return gdb_get_reg32(mem_buf, env->sr); + case 16: { + /* SR is made of SR+CCR, CCR is many 1bit flags so uses helper */ + return gdb_get_reg32(mem_buf, (env->sr | cpu_m68k_get_ccr(env))); + } case 17: return gdb_get_reg32(mem_buf, env->pc); }