Based on feedback, review comments are incorporated. Could you please review and let me know if its okay. [Patch, microblaze]: Fix for remote G Packet message too long error for baremetal. Prior to version MicroBlaze v8.10.a,EDK 13.1, XMD's gdbserver stub returned 57 registers in response to GDB's G request. Starting with version MicroBlaze v8.10.a, EDK 13.1, XMD added the slr and shr register, for a count of 59 registers.This patch adds these registers to the expected G response. This patch fixes the above problem for baremetal and also supports the backward compatibility. ChangeLog: 2014-06-19 Ajit Agarwal * microblaze-tdep.c (microblaze_register_names): Add the rshr and rslr register names. (microblaze_gdbarch_init): Use of tdesc_has_registers. Use of tdesc_find_feature. Use of tdesc_data_alloc. Use of tdesc_numbered_register. Use of microblaze_register_g_packet_guesses. Use of tdesc_use_registers. Use of set_gdbarch_register_type. (microblaze_register_g_packet_guesses): New. * microblaze-tdep.h (microblaze_reg_num): Add field MICROBLAZE_SLR_REGNUM MICROBLAZE_SHR_REGNUM MICROBLAZE_NUM_REGS and MICROBLAZE_NUM_CORE_REGS. (microblaze_frame_cache): Use of MICROBLAZE_NUM_REGS. * features/microblaze-core.xml: New file. * features/microblaze-stack-protect.xml: New file. * features/microblaze-with-stack-protect.c: New file. * features/microblaze-with-stack-protect.xml: New file. * features/microblaze.xml: New file. * features/microblaze.c: New file. * features/Makefile (microblaze-linux): Add microblaze-linux microblaze and microblaze-expedite. * regformats/microblaze-with-stack-protect.dat: New file. * regformats/microblaze.dat: New file. Signed-off-by:Ajit Agarwal ajitkum@xilinx.com -----Original Message----- From: Ajit Kumar Agarwal Sent: Wednesday, June 18, 2014 9:28 PM To: 'Pedro Alves' 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. 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 . 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