This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [Patch, microblaze]: Fix for remote G Packet message too long error for baremetal.
- From: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Michael Eager <eager at eagercon dot com>, Vinod Kathail <vinodk at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, Nagaraju Mekala <nmekala at xilinx dot com>
- Date: Wed, 18 Jun 2014 15:57:42 +0000
- Subject: RE: [Patch, microblaze]: Fix for remote G Packet message too long error for baremetal.
- 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: <fe2ea02f-37b9-4ebe-acd4-6d1192c26358 at BN1AFFO11FD059 dot protection dot gbl> <53A023B1 dot 5000105 at redhat dot com> <859f27cb-8c46-46c1-9625-7287c60f3ae9 at BY2FFO11FD007 dot protection dot gbl> <53A1ABF0 dot 9080004 at redhat dot com> <74281fd5-518a-4d7f-977a-6fa1320f6db9 at BY2FFO11FD016 dot protection dot gbl> <53A1B61F dot 9080803 at redhat dot com>
Thanks for the clarifications and comments. I will incorporate the change.
Thanks & Regards
Ajit
-----Original Message-----
From: Pedro Alves [mailto:palves@redhat.com]
Sent: Wednesday, June 18, 2014 9:24 PM
To: Ajit Kumar Agarwal
Cc: gdb-patches@sourceware.org; Michael Eager; Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch, microblaze]: Fix for remote G Packet message too long error for baremetal.
On 06/18/2014 04:39 PM, Ajit Kumar Agarwal wrote:
> The info registers against such a stub( where the design does not
> have stack-protect registers) shows the registers $rshr and $rslr but
> it shows as <unavailable>. Is the display of $rshr and $rslr
> happening because of this second guess with -2 case?
Yes, because you're guessing a target description that includes the registers.
Is it inappropriate to have the second guess with -2 case?
It is, but you're guessing the wrong description...
In addition to tdesc_microblaze_with_stack_protect, create _another_ description that does _not_ xi:include the stack protect feature, and register the guess with that:
microblaze_register_g_packet_guesses (struct gdbarch *gdbarch) {
register_remote_g_packet_guess (gdbarch,
MICROBLAZE_NUM_REGS,
tdesc_microblaze_with_stack_protect);
register_remote_g_packet_guess (gdbarch,
MICROBLAZE_NUM_REGS - 2,
tdesc_microblaze); }
I'd add a MICROBLAZE_NUM_CORE_REGS value to the registers enum. Then instead of that magic " - 2", you could write:
{
register_remote_g_packet_guess (gdbarch,
MICROBLAZE_NUM_CORE_REGS,
tdesc_microblaze);
register_remote_g_packet_guess (gdbarch,
MICROBLAZE_NUM_REGS,
tdesc_microblaze_with_stack_protect);
--
Pedro Alves