This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [Patch, microblaze]: Add slr and shr regs
- From: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
- To: Pedro Alves <palves at redhat dot com>, Michael Eager <eager at eagercon dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Yao Qi <yao at codesourcery dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, Vinod Kathail <vinodk at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, Nagaraju Mekala <nmekala at xilinx dot com>
- Date: Mon, 9 Jun 2014 17:26:01 +0000
- Subject: RE: [Patch, microblaze]: Add slr and shr regs
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp dot mailfrom=ajit dot kumar dot agarwal at xilinx dot com;
- References: <c6fe468a-5e02-430a-b34b-73de6bfd2b97 at BY2FFO11FD021 dot protection dot gbl> <537EFA08 dot 1060309 at eagercon dot com> <f0c2c22a-d3d6-45d1-92ba-660dd364fd89 at BL2FFO11FD051 dot protection dot gbl> <537FCEDA dot 9030504 at eagercon dot com> <2e5c185d-329c-46cf-930c-8cc2288891aa at BN1BFFO11FD019 dot protection dot gbl> <538431FB dot 2070904 at eagercon dot com> <865132b2-a593-4147-a7c6-cee25c1ed0fd at BN1AFFO11FD052 dot protection dot gbl> <53845299 dot 5080601 at redhat dot com>
Sorry for the late response as I was on Vacation. Please find my response inlined below.
-----Original Message-----
From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Pedro Alves
Sent: Tuesday, May 27, 2014 2:24 PM
To: Ajit Kumar Agarwal; Michael Eager; gdb-patches@sourceware.org; Yao Qi
Cc: Joel Brobecker; Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch, microblaze]: Add slr and shr regs
On 05/27/2014 08:46 AM, Ajit Kumar Agarwal wrote:
> Update the problem description and here it is.
>
> [Patch, microblaze]: Add slr and shr regs
>
> Prior to version 2013.1, XMD's gdbserver stub returned 57 registers in
> response to GDB's G request. Starting with version 2013.1, XMD added the
> slr and shr register, for a count of 59 registers. This patch adds
> these registers to the expected G response.
>
>>> What targets have you built and tested?
>
> Microblaze target has been built and tested.
>>Did you test new GDB against old stub?
>>I've looked at the microblaze reference guide, and saw that these registers are optional. What happens if you debug a system where C_USE_STACK_PROTECTION was set to 0? Do we >>still show these registers to the user?
SLR/SHR was added in MicroBlaze v8.10.a, EDK 13.1. XMD's gdbserver stub releasesed before this design throws an error mentioning gdb is not supported for the version below v8.10.a, EDK 13.1.
The slr(stack low register) and shr(stack high registers) are implemented based on C_USE_STACK_PROTECTION is set 0/1. Microblaze being the reconfigurable architecture the design can be selected with and without these registers. Its hard to identify in gdb whether these registers is being implemented for the design or not. In XMD where the gdb client connects to the local host we always display the shr and shl registers irrespective of C_USE_STACK_PROTECTION is set or not. In the case where the design is not implemented with these register we always display the content to be 0 or ? to the user. gdb will also display these registers when the C_USE_STACK_PROTECTION is set 0/1.
--
Pedro Alves