From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by sourceware.org (Postfix) with ESMTPS id A9706395CCB4 for ; Thu, 11 Jun 2020 13:16:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A9706395CCB4 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x443.google.com with SMTP id x13so6132940wrv.4 for ; Thu, 11 Jun 2020 06:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YO6P5SFUau12ciYxwkKBa3ySFoXZc98DWkL7rNEeNaI=; b=c9GaNOefPHdVIG7Q1E6Tfq8ZqgAOcGPD+FHjt7VO+IgK5XCoRQPhik6n6hlO0Ww06J ng4sqCDp5LPsJiRf8tYcDSqaXYKL3J1e3qjWCstpRVMdB0FQ2p9lxtoEFE7jNcOITSRy chP6P6YVKQG7iV+dK6lpA4fcNUupvW4cfa5qzqyibR2MmX7bg1hmaTJCSWwIJi4onSKX Y3HWIWtBC8E4ErO3zSl2kj5635W3PCG7YA1FcuZ7dvLIPzcsXkXCY0WqgpWJKzIDzC6F yh1P6jd0IyKQjBDQkIfdGdZKI+TVnLFFSIAzbZlMDRjvPXxnJszHXGwvWsm84FdDSqZh iINA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YO6P5SFUau12ciYxwkKBa3ySFoXZc98DWkL7rNEeNaI=; b=tWx3cSTGCXGTBoUwGVpwVW2a+pq/xV9iQ3zxnG6ajjch5K31FWRWA+QGDIs3/SPnTr SxBZ2IwVrBVBq6R7qWwUMTmXwUr5/I8i7d7686c2zc8Gmp6UBXYxVXKac1C+el7KGBTy PSC7fz7kNete26r7LrDaZX35shbwjV8j+yLfZjlVGiz5dKmKDNJojDJP/9bvwp4yjqOe khNS5VvOrn5B2TA0F3WaJwPOlcO6E3JMQSjZWzSUSoE88ay+k0a0YZFmh+T0M5O1qwmT KaqUl0WBbtpvPxnlismG4RkATxi9f15xWaVag6TTEkeQc/R1AWIuTN/RV9g3oQj4eJ9f Jr9Q== X-Gm-Message-State: AOAM530zsIDlPthyCccH50zo0CyAhWgunUEUdSfKn1VmkG4wGKpf9v3J KEwrTMp+q9DpeAXqqBoW0UXCOosSD1Y= X-Google-Smtp-Source: ABdhPJw7brErdZSEFcPUqFs2aRkGw/SWUeP9icHLLxM0AkmmG1VJxitneSrK/KdTEiOi5SHZjv9s4Q== X-Received: by 2002:a5d:5084:: with SMTP id a4mr9706151wrt.416.1591881379482; Thu, 11 Jun 2020 06:16:19 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id o9sm4095910wmh.37.2020.06.11.06.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 06:16:18 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCH 0/2] [PATCHv2] gdb/riscv: Improved register alias name creation Date: Thu, 11 Jun 2020 14:16:13 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: <87d0673rmx.fsf@tromey.com> References: <87d0673rmx.fsf@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 13:16:22 -0000 Tom, Thanks for the logs, these set me in the right direction to find the mistake in my patch. I now have two patches. The first alone should be enough to get things working for you now; it's basically the same patch as before but with a small bug fix. The second patch is a user experience improvement that seemed obvious once I understood what was going wrong with the first patch. After the first patch you should expect to be able to connect to the remote and see this: (gdb) p $dscratch Could not fetch register "dscratch"; remote failure reply 'E14' (gdb) p $dscratch0 Could not fetch register "dscratch"; remote failure reply 'E14' However if you do 'info registers csr' you'll find this line: dscratch0 Could not fetch register "dscratch"; remote failure reply 'E14' Which is a little odd as your target description clearly says you have 'dscratch', not 'dscratch0'. After the second patch the same info registers will now report: dscratch Could not fetch register "dscratch"; remote failure reply 'E14' This leaves just one question from me. I thought that your original thread started by saying that once upon a time you could successfully read the dscratch and/or the dscratch0 registers. The some patches landed and you could no longer read the registers. >From what I'm seeing though, the _actual_ failure to read the register is all QEMU. So my question, did I missunderstand the original problem? Is there a build of GDB where you are able to read actual values from these registers? Either way, I think these patches should go in, so let me know if they help at all. Thanks, Andrew --- Andrew Burgess (2): gdb/riscv: Improved register alias name creation gdb/riscv: Take CSR names from target description gdb/ChangeLog | 25 +++++++ gdb/riscv-tdep.c | 170 +++++++++++++++++++++++++++++++---------------- 2 files changed, 137 insertions(+), 58 deletions(-) -- 2.25.4