From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6951 invoked by alias); 7 Oct 2014 10:16:50 -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 6942 invoked by uid 89); 7 Oct 2014 10:16:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,URIBL_RHS_DOB autolearn=no version=3.3.2 X-HELO: na01-bn1-obe.outbound.protection.outlook.com Received: from mail-bn1on0054.outbound.protection.outlook.com (HELO na01-bn1-obe.outbound.protection.outlook.com) (157.56.110.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 07 Oct 2014 10:16:48 +0000 Received: from BN1AFFO11FD045.protection.gbl (10.58.52.32) by BN1AFFO11HUB048.protection.gbl (10.58.52.107) with Microsoft SMTP Server (TLS) id 15.0.1039.16; Tue, 7 Oct 2014 10:16:44 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BN1AFFO11FD045.mail.protection.outlook.com (10.58.53.60) with Microsoft SMTP Server (TLS) id 15.0.1039.16 via Frontend Transport; Tue, 7 Oct 2014 10:16:44 +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 1XbRnI-00008M-9H; Tue, 07 Oct 2014 03:15:00 -0700 From: Ajit Kumar Agarwal To: Pedro Alves , "gdb-patches@sourceware.org" CC: Vinod Kathail , Vidhumouli Hunsigida , Nagaraju Mekala Subject: [Patch, microblaze]: Added cleanup data for invalid target description Date: Tue, 07 Oct 2014 10:16:00 -0000 Content-Type: multipart/mixed; boundary="_002_37378DC5BCD0EE48BA4B082E0B55DFAA40BE3DF7XAPPVEXMBX01xln_" MIME-Version: 1.0 X-RCIS-Action: ALLOW Message-ID: <07638ee5ff984d21a51b468a841f9dba@BN1AFFO11FD045.protection.gbl> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(438002)(189002)(199003)(377424004)(92566001)(2656002)(85852003)(86362001)(87936001)(99396003)(71186001)(84326002)(76482002)(229853001)(104016003)(512954002)(107046002)(46102003)(108616004)(85306004)(33646002)(80022003)(99936001)(50986999)(95666004)(31966008)(77096002)(106466001)(20776003)(568964001)(74316001)(19580405001)(120916001)(19580395003)(53416004)(6806004)(44976005)(4396001)(54356999)(21056001)(107986001)(24736002)(23106004);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1AFFO11HUB048;H:xsj-pvapsmtpgw01;FPR:;MLV:sfv;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1AFFO11HUB048; X-Forefront-PRVS: 035748864E Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; 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-OriginatorOrg: xilinx.com X-SW-Source: 2014-10/txt/msg00107.txt.bz2 --_002_37378DC5BCD0EE48BA4B082E0B55DFAA40BE3DF7XAPPVEXMBX01xln_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-length: 1184 Please find the following patch based on Pedro Suggestion.=20 [Patch, microblaze]: Added cleanup data for invalid target description. =20=20=20=20 Cleanup the tdesc data if the target description check is invalid. =20=20=20=20 2014-10-07 Ajit Agarwal =20=20=20=20 * microblaze-tdep.c (microblaze_gdbarch_init): Use of tdesc_data_cleanup. =20=20=20=20 Signed-off-by:Ajit Agarwal ajitkum@xilinx.com --- gdb/microblaze-tdep.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index 6a9f11f..f257b96 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -722,7 +722,13 @@ microblaze_gdbarch_init (struct gdbarch_info info, str= uct gdbarch_list *arches) MICROBLAZE_SHR_REGNUM, "rshr"); } - } + + if (!valid_p) + { + tdesc_data_cleanup (tdesc_data); + return NULL; + } + } /* Allocate space for the new architecture. */ tdep =3D XNEW (struct gdbarch_tdep); -- 1.7.1 Thanks & Regards Ajit --_002_37378DC5BCD0EE48BA4B082E0B55DFAA40BE3DF7XAPPVEXMBX01xln_ Content-Type: application/octet-stream; name="0001-Patch-microblaze-Added-cleanup-data-for-invalid-targ.patch" Content-Description: 0001-Patch-microblaze-Added-cleanup-data-for-invalid-targ.patch Content-Disposition: attachment; filename="0001-Patch-microblaze-Added-cleanup-data-for-invalid-targ.patch"; size=1196; creation-date="Tue, 07 Oct 2014 10:04:15 GMT"; modification-date="Tue, 07 Oct 2014 10:03:07 GMT" Content-Transfer-Encoding: base64 Content-length: 1623 RnJvbSAwMGYyNjkyZDEwZTAyNTQzNjY0NzEwOTU1MTZkNjU3NjkzYWVmZjQy IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBBaml0IEt1bWFyIEFn YXJ3YWwgPGFqaXRrdW1AeGhkc3BkZ251Lihub25lKT4KRGF0ZTogVHVlLCA3 IE9jdCAyMDE0IDE1OjA2OjA4ICswNTMwClN1YmplY3Q6IFtQQVRDSF0gW1Bh dGNoLCBtaWNyb2JsYXplXTogQWRkZWQgY2xlYW51cCBkYXRhIGZvciBpbnZh bGlkIHRhcmdldCBkZXNjcmlwdGlvbi4KCkNsZWFudXAgdGhlIHRkZXNjIGRh dGEgaWYgdGhlIH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