From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26694 invoked by alias); 18 Jun 2014 15:10:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 26682 invoked by uid 89); 18 Jun 2014 15:10:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 18 Jun 2014 15:10:49 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5IFAhlJ011282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 Jun 2014 11:10:43 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5IFAfEq011761; Wed, 18 Jun 2014 11:10:41 -0400 Message-ID: <53A1ABF0.9080004@redhat.com> Date: Wed, 18 Jun 2014 15:10:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 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. References: <53A023B1.5000105@redhat.com> <859f27cb-8c46-46c1-9625-7287c60f3ae9@BY2FFO11FD007.protection.gbl> In-Reply-To: <859f27cb-8c46-46c1-9625-7287c60f3ae9@BY2FFO11FD007.protection.gbl> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-06/txt/msg00667.txt.bz2 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. > + 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, > µblaze_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. -- Pedro Alves