From nobody Tue Nov 5 05:08:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1560078098; cv=none; d=zoho.com; s=zohoarc; b=FM0st5Kx8xNhYpO/3hlDo1ghmcfoub8g0mVhhbz7E8GhfcnrmVoDHZZ+CODwbTY4PIuePp6HTGQb4DNFfxr3ruFSNCji7Z3ZyAm7SVT2LiXrr/rmWveI96r8tFBnANCsD6PW+z8rtpWnpLKAQzAhshmMfLQkEWHokpgZlan8iGQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560078098; h=Content-Type:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=A7XFk/cRaCDQvL+Mi/+bJBxTQNAdsRFYEqO98UFpvSs=; b=BEzGw77poc//K87LjRvScI2EadhV5nnW7M99K0lKP/hyNG6E/cISRJju6+CtIGyKRch79SSSoMgkVjFpSeXfgZ9vLy78HiFuYIaOXwDXp1yoBDnA3xF2UQkq2WOBxlwpqfsyTJ76q9NgmVVFYg2/1ne41C0NZKFLV5LyCksCrNQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156007809851587.32663178237249; Sun, 9 Jun 2019 04:01:38 -0700 (PDT) Received: from localhost ([::1]:34878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZvZV-0005SS-SQ for importer@patchew.org; Sun, 09 Jun 2019 07:01:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50647) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZvQo-0003xD-91 for qemu-devel@nongnu.org; Sun, 09 Jun 2019 06:52:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZvQl-0001HJ-1X for qemu-devel@nongnu.org; Sun, 09 Jun 2019 06:52:10 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:39710) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZvQf-00019b-8Y for qemu-devel@nongnu.org; Sun, 09 Jun 2019 06:52:04 -0400 Received: by mail-pl1-x642.google.com with SMTP id g9so2508376plm.6 for ; Sun, 09 Jun 2019 03:51:59 -0700 (PDT) Received: from localhost.localdomain (i60-43-49-30.s30.a048.ap.plala.or.jp. [60.43.49.30]) by smtp.gmail.com with ESMTPSA id j14sm7232634pfe.10.2019.06.09.03.51.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 09 Jun 2019 03:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=A7XFk/cRaCDQvL+Mi/+bJBxTQNAdsRFYEqO98UFpvSs=; b=KLozLhUAw9YmoHiqbSNXPXSkW6/0lS5nNjBRBXeCzOJZsUsa5nhfM2V/gILSkZnR5T 8WPVkW6/tjdKmHiEN7rxxlXo02MNQ2GSzfSwBVFw5N+uINdWKFR6xxx6sdv6rCPjOG4K E90HwWiaffaLulkwHe7e7f2raGdh8+JY+MXJfN33fskhJP2OEh1nKvnRnj5yZdZAf98l olGvUMc9k8qU8oOG5qnH9qN/nuuIevju2lLkMEV/71Vx1ZmrMlb9SIR64EqQpsxX2b1U 3acS9YL+f9lwVb564nlq1RSw96M5IJMmlIPpRhHJEkpT2RLefdQk75kjHX4d5b3OtKLl 3Dow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=A7XFk/cRaCDQvL+Mi/+bJBxTQNAdsRFYEqO98UFpvSs=; b=YRtuTw8UduRzH2tpO+mitBMq193QfnF9dW3RFnZyholarewBgneszOcCJmiUatOaGI E4Z5VkDB/coUAqjz8yeCTzmLdOAwwjUJbf4iWTt3Cxepqsle0w7i8ruENG6GzARHQk6O U5G8tuvrPeEgbuuiN4yMmKkOE7WNL8jJR6xlfs6h3H3nVi8EuIy0AMG3QpZUCDMbNhzn 8suYk84nBGKaVBHnaYe3KeWM+HIEcrJnNEtsb1ucMyNfgFB9ndP6BYvr4zwr0oA1plqT qqWP6mR7GO8e0qlMf14O13qGiNqX7ke75Wd3Wrv0FZ0/6aFigctytLu3OBZ7MGdLDFl0 TSFg== X-Gm-Message-State: APjAAAUSHvmBMX74oMkE/cCecKco9f1FmqbWvkdutdFV2nh1AZjnA/58 MMMTM/SMunqYfN3g4bfj/bgLadm9 X-Google-Smtp-Source: APXvYqy6BnelalA9VBTXAhxwZbOb2bSMSZhhrjWa3IihL2x8ND0oKi5H4wCtfXtqV/MCo0kvIlWwZg== X-Received: by 2002:a17:902:4381:: with SMTP id j1mr64175495pld.286.1560077518046; Sun, 09 Jun 2019 03:51:58 -0700 (PDT) Date: Sun, 9 Jun 2019 19:51:54 +0900 From: Lucien Murray-Pitts To: qemu-devel@nongnu.org, Laurent Vivier , Lucien Murray-Pitts Message-ID: <20190609105154.GA16755@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.11.4 (2019-03-13) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH v3] The m68k gdbstub SR reg request doesnt include Condition-Codes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 m68k_cpu_gdb_read_register for SR register. Signed-off-by: Lucien Murray-Pitts Reviewed-by: Laurent Vivier --- Notes: v1->v2 - removed my superfluous braces - slightly amended the commit message =20 v2->v3 - removed my incorrect use of code block in a switch target/m68k/gdbstub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/m68k/gdbstub.c b/target/m68k/gdbstub.c index fd2bb46c42..6e7f3b8980 100644 --- a/target/m68k/gdbstub.c +++ b/target/m68k/gdbstub.c @@ -36,7 +36,8 @@ int m68k_cpu_gdb_read_register(CPUState *cs, uint8_t *mem= _buf, int n) } else { switch (n) { case 16: - return gdb_get_reg32(mem_buf, env->sr); + /* 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); } --=20 2.21.0