From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28361 invoked by alias); 18 Jun 2014 15:40:04 -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 28351 invoked by uid 89); 18 Jun 2014 15:40:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: na01-bn1-obe.outbound.protection.outlook.com Received: from mail-bn1blp0182.outbound.protection.outlook.com (HELO na01-bn1-obe.outbound.protection.outlook.com) (207.46.163.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 18 Jun 2014 15:40:02 +0000 Received: from BY2FFO11FD016.protection.gbl (10.1.14.31) by BY2FFO11HUB026.protection.gbl (10.1.14.112) with Microsoft SMTP Server (TLS) id 15.0.969.12; Wed, 18 Jun 2014 15:39:57 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BY2FFO11FD016.mail.protection.outlook.com (10.1.14.148) with Microsoft SMTP Server (TLS) id 15.0.969.12 via Frontend Transport; Wed, 18 Jun 2014 15:39:57 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1WxHy4-0006bz-I1; Wed, 18 Jun 2014 08:40:08 -0700 From: Ajit Kumar Agarwal 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. Date: Wed, 18 Jun 2014 15:40:00 -0000 References: <53A023B1.5000105@redhat.com> <859f27cb-8c46-46c1-9625-7287c60f3ae9@BY2FFO11FD007.protection.gbl> <53A1ABF0.9080004@redhat.com> In-Reply-To: <53A1ABF0.9080004@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-RCIS-Action: ALLOW Message-ID: <74281fd5-518a-4d7f-977a-6fa1320f6db9@BY2FFO11FD016.protection.gbl> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(6009001)(438001)(13464003)(479174003)(377454003)(51704005)(189002)(199002)(24454002)(21056001)(4396001)(83322001)(19580405001)(44976005)(19580395003)(81342001)(31966008)(46102001)(74662001)(6806004)(80022001)(81542001)(46406003)(70736001)(74502001)(33646001)(23726002)(93886003)(1496007)(86362001)(92566001)(31696002)(97756001)(76176999)(99396002)(50986999)(54356999)(92726001)(85306003)(74316001)(104016002)(95666004)(77096002)(53416004)(87936001)(50466002)(2656002)(77982001)(79102001)(76482001)(64706001)(47776003)(20776003)(85852003)(83072002);DIR:OUT;SFP:;SCL:1;SRVR:BY2FFO11HUB026;H:xsj-pvapsmtpgw01;FPR:;MLV:sfv;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; X-OriginatorOrg: xilinx.onmicrosoft.com X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 02462830BE Received-SPF: Pass (: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=ajit.kumar.agarwal@xilinx.com; X-SW-Source: 2014-06/txt/msg00674.txt.bz2 Thanks for the review comments. -----Original Message----- From: Pedro Alves [mailto:palves@redhat.com]=20 Sent: Wednesday, June 18, 2014 8:41 PM To: Ajit Kumar Agarwal Cc: gdb-patches@sourceware.org; Michael Eager; Vinod Kathail; Vidhumouli Hu= nsigida; 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,=20 > +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 > +tdesc_microblaze_with_stack_protect); >=20=20 > + register_remote_g_packet_guess (gdbarch, > + MICROBLAZE_NUM_REGS - 2, > +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 > + 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_ th= e stack protect feature. Please make >>sure you test GDB against such a st= ub, and confirm that "info registers" >>does not show $shrl $rslr. The info registers against such a stub( where the design does not have sta= ck-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 wit= h -2 case? > + feature =3D tdesc_find_feature (tdesc, > + "org.gnu.gdb.microblaze.core"); > + if (feature =3D=3D NULL) > + { > + return NULL; > + } Unnecessary braces: if (feature =3D=3D NULL) return NULL; > @@ -736,7 +793,8 @@ void > _initialize_microblaze_tdep (void) > { > register_gdbarch_init (bfd_arch_microblaze,=20 > microblaze_gdbarch_init); > - > +=20=20 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=20 > 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} >=20=20 > + > #endif /* microblaze-tdep.h */ >>Spurious whitespace change. Thanks for this. I will incorporate this change. --=20 Pedro Alves