This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [Patch, microblaze]: Fix for remote G Packet message too long error for baremetal.


Thanks for the review comments.

-----Original Message-----
From: Pedro Alves [mailto:palves@redhat.com] 
Sent: Wednesday, June 18, 2014 8:41 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 12:05 PM, Ajit Kumar Agarwal wrote:
>    gdb_assert (reg < sizeof (dwarf2_to_reg_map));
>    return dwarf2_to_reg_map[reg];
>  }
> +static void
> +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_with_stack_protect);

>>Again, this doesn't make sense.  If the g packet doesn't include shrl and rslr (the '- 2' case), then the guess should be a description _without_ the stack protect feature.  Please make >>sure you test GDB against such a stub, and confirm that "info registers"
>>does not show $shrl $rslr.

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? Is it inappropriate to have the second guess with -2 case?
> +      feature = tdesc_find_feature (tdesc,
> +                                    "org.gnu.gdb.microblaze.core");
> +      if (feature == NULL)
> +        {
> +          return NULL;
> +        }

Unnecessary braces:

      if (feature == NULL)
        return NULL;


> @@ -736,7 +793,8 @@ void
>  _initialize_microblaze_tdep (void)
>  {
>    register_gdbarch_init (bfd_arch_microblaze, 
> microblaze_gdbarch_init);
> -
> +  

This add spurious whitespace at the end of the line.  I bet running "git am" on your patch complains.

> +  initialize_tdesc_microblaze_with_stack_protect ();
>    /* Debug this files internals.  */
>    add_setshow_zuinteger_cmd ("microblaze", class_maintenance,
>  			     &microblaze_debug_flag, _("\
> diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h index 
> a532092..bbce428 100644
> --- a/gdb/microblaze-tdep.h
> +++ b/gdb/microblaze-tdep.h
> @@ -26,28 +26,6 @@ struct gdbarch_tdep  {  };

...

> @@ -117,4 +119,5 @@ enum microblaze_regnum
>     Only used for native debugging.  */
>  #define MICROBLAZE_BREAKPOINT {0xb9, 0xcc, 0x00, 0x60}
>  
> +
>  #endif /* microblaze-tdep.h */

>>Spurious whitespace change.

Thanks for this. I will incorporate this change.
-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]