From patchwork Fri Dec 28 22:05:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Wilson X-Patchwork-Id: 1019265 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=208.118.235.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.b="dd8xs0S9"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43RLsP48qjz9s55 for ; Sat, 29 Dec 2018 09:26:32 +1100 (AEDT) Received: from localhost ([127.0.0.1]:33554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gd0aL-0003C0-5i for incoming@patchwork.ozlabs.org; Fri, 28 Dec 2018 17:26:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gd0U7-0004zz-Sn for qemu-devel@nongnu.org; Fri, 28 Dec 2018 17:20:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gd0Gf-00056h-Cl for qemu-devel@nongnu.org; Fri, 28 Dec 2018 17:06:10 -0500 Received: from mail-vs1-xe44.google.com ([2607:f8b0:4864:20::e44]:40852) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gd0Ge-00056K-VX for qemu-devel@nongnu.org; Fri, 28 Dec 2018 17:06:09 -0500 Received: by mail-vs1-xe44.google.com with SMTP id z3so13702652vsf.7 for ; Fri, 28 Dec 2018 14:06:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=W9/vjzhPdbumhkH9piUbeikPgVDyvN2D74ao/eJmjg4=; b=dd8xs0S9woHdAxNeIbAWFwVxoOG/mnCmgHExW9hky9YwgyC0WEBCcG/Q9OXo4RDxlN GtLoyivFLMa+76b+fxkssdgjHjvrLHMZfPM8Avp3ZFmEOyicfZkl3XvXcJXLa7uBIEB8 AavN2+o2LqJhR9M0xN+qkv/axFDUf0VDElewstXdHQ8w8YIDGU3M40V6j7yfMDOcvfbZ 1B9cbN+xcnekYL7bwx8D1eO3IMulFROGCn3f240E63s6dOpYXXIq2PduMQzgdcq0bA0F MFn+3LCjFBbE+U4YCnSDyKKeunF5DVlHUE4yaHZpHK0fmhj3kmCWUoONz9U+zDaEEFgg nHSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=W9/vjzhPdbumhkH9piUbeikPgVDyvN2D74ao/eJmjg4=; b=MfEwdLUSFJxmRbAEsnb/wcbkeQdixd3Ls16rEEvxgB1bfBpjsJ284zAx8SY1Yno/Xq t1OwxmgKawYgSm2VcrwM8dlgt+/u9P5jtBUqs0Xcel7axhlO18iJj+MJYjZmLWQ5bOU8 LM1cJwskiUIsJTph9JSdf4WMxEslGWdk5X3eoyUCXjX32QBysKMiQDX6JqzL4YF/hT3v JqEZ3hXklJ4kLeQo0iqq4FfSLo1wE/eFv+6CNyd5XotF30NE7DmCEsiLyQgknwLKe5KP wbl1hR0TiLOn1G8V3n181Um/RuNjD+jtVeeN2e3CcinXIlpxiACT2rBrl6bR26xz3b0N 2r0A== X-Gm-Message-State: AA+aEWZvoEVx9W1P8Rd3yxVulo0lieoTz3hfX+peGfuDi/dd9AYJdRLn dKG1dPJS9QA8sXvQKs1LUoE8Iu7V4yv8E4F2cAiQRCr6+X1+cg== X-Google-Smtp-Source: ALg8bN62x8xo/dFNcw/NeKM9YNdGJVRAEBJkR2oF+phH/b3dxehxA+ku92QGrNlvKJFZvMEoZMDxgUkq174XCluMFnQ= X-Received: by 2002:a67:4e5d:: with SMTP id c90mr11953130vsb.72.1546034768060; Fri, 28 Dec 2018 14:06:08 -0800 (PST) MIME-Version: 1.0 From: Jim Wilson Date: Fri, 28 Dec 2018 14:05:57 -0800 Message-ID: To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::e44 Subject: [Qemu-devel] [PATCH 0/5 v2] RISC-V: Add gdb xml files and gdbstub support. 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: qemu-riscv@nongnu.org, Jim Wilson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This is the second version of the patch set. I haven't gotten any bug reports for the patches in the several weeks that they have been available, and no review yet, so the only significant difference from the first version is that I ran them through checkpatch to fix style issues, and I sent them to the right mailing list this time. With these patches, I can run system qemu with -s -S, connect to it with gdb, and then print any integer, FP, or CSR register. This support is currently broken. The first two patches in the series are just dropping in xml files from gdb unchanged, with configure support to point at them. The next two patches are the inconvenient stuff. The gdb CSR files are in documentation order not numerical order, so I need an array to map the gdb numbers to the actual hardware numbers. The gdb files should probably be improved, but I don't know when that will happen. That is the third patch. The fourth patch is to disable all of the illegal instruction checks when accessing CSRs from the debugger, as it needs to be able to access them without traps. The last patch adds the gdbstub support to use the new xml files which is pretty simple, though there is an unanswered question in there about what to do with the FP registers. Should we try to configure them based on the target? Right now I just always enable them which is the simple solution. I'm not sure if enabling them based on the target will even work with gdb or not. Jim