From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22165 invoked by alias); 17 Nov 2009 12:34:14 -0000 Received: (qmail 22154 invoked by uid 22791); 17 Nov 2009 12:34:13 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Nov 2009 12:33:09 +0000 Received: (qmail 23661 invoked from network); 17 Nov 2009 12:33:08 -0000 Received: from unknown (HELO mbp.local) (maxim@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Nov 2009 12:33:08 -0000 Message-ID: <4B0297FB.9010507@codesourcery.com> Date: Tue, 17 Nov 2009 12:34:00 -0000 From: Maxim Kuvyrkov User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: Daniel Jacobowitz Subject: [PATCH, M68K] Fix initialization References: <4B029388.5070001@codesourcery.com> In-Reply-To: <4B029388.5070001@codesourcery.com> Content-Type: multipart/mixed; boundary="------------000400000309060206060209" X-IsSubscribed: yes 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 X-SW-Source: 2009-11/txt/msg00383.txt.bz2 This is a multi-part message in MIME format. --------------000400000309060206060209 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 236 Hi, This patch makes m68k_gdbarch_init reuse previous initialization if there is one; this is quite similar to what other targets do. OK to apply? Regards, -- Maxim Kuvyrkov CodeSourcery maxim@codesourcery.com (650) 331-3385 x724 --------------000400000309060206060209 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="fsf-gdb-m68k-reinit-fix.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fsf-gdb-m68k-reinit-fix.ChangeLog" Content-length: 123 2009-11-17 Daniel Jacobowitz * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization. --------------000400000309060206060209 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="fsf-gdb-m68k-reinit-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fsf-gdb-m68k-reinit-fix.patch" Content-length: 592 gdb/m68k-tdep.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index dcf8779..e6a4177 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -1160,6 +1160,13 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) break; } + if (best_arch != NULL) + { + if (tdesc_data != NULL) + tdesc_data_cleanup (tdesc_data); + return best_arch->gdbarch; + } + tdep = xzalloc (sizeof (struct gdbarch_tdep)); gdbarch = gdbarch_alloc (&info, tdep); tdep->fpregs_present = has_fp; --------------000400000309060206060209--