From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25599 invoked by alias); 20 Oct 2006 00:41:48 -0000 Received: (qmail 25588 invoked by uid 22791); 20 Oct 2006 00:41:47 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.29.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 20 Oct 2006 00:41:44 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.8/8.13.8) with ESMTP id k9K0fcsX113246 for ; Fri, 20 Oct 2006 00:41:38 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k9K0iDaT2629736 for ; Fri, 20 Oct 2006 02:44:13 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k9K0fcEh011124 for ; Fri, 20 Oct 2006 02:41:38 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id k9K0fcQF011121; Fri, 20 Oct 2006 02:41:38 +0200 Message-Id: <200610200041.k9K0fcQF011121@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 20 Oct 2006 02:41:38 +0200 Subject: [PATCH] Re: [RFC] Replace deprecated_target_new_objfile_hook by observer? To: brobecker@adacore.com (Joel Brobecker) Date: Fri, 20 Oct 2006 00:41:00 -0000 From: "Ulrich Weigand" Cc: drow@false.org (Daniel Jacobowitz), gdb-patches@sources.redhat.com In-Reply-To: <20061019142951.GB1338@adacore.com> from "Joel Brobecker" at Oct 19, 2006 10:29:51 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00248.txt.bz2 Joel Brobecker wrote: > Would you mind submitting your change for inclusion? I could then > leverage off of this change for the transition to observers. Sure, here goes the patch again. Tested on s390-ibm-linux and s390x-ibm-linux. OK for mainline? Bye, Ulrich ChangeLog: * linux-thread-db.c (check_for_thread_db): Don't attempt to use thread_db for remote targets. * remote.c (remote_new_objfile): Always call predecessor on new_objfile event chain. Index: gdb/linux-thread-db.c =================================================================== RCS file: /cvs/src/src/gdb/linux-thread-db.c,v retrieving revision 1.20 diff -u -p -r1.20 linux-thread-db.c --- gdb/linux-thread-db.c 15 Oct 2006 19:38:45 -0000 1.20 +++ gdb/linux-thread-db.c 19 Oct 2006 20:08:44 -0000 @@ -599,6 +599,10 @@ check_for_thread_db (void) if (!target_has_execution) return; + /* Don't attempt to use thread_db for remote targets. */ + if (!target_can_run (¤t_target)) + return; + /* Initialize the structure that identifies the child process. */ proc_handle.pid = GET_PID (inferior_ptid); Index: gdb/remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.234 diff -u -p -r1.234 remote.c --- gdb/remote.c 18 Oct 2006 16:56:13 -0000 1.234 +++ gdb/remote.c 19 Oct 2006 20:08:44 -0000 @@ -6126,8 +6126,7 @@ remote_new_objfile (struct objfile *objf remote_check_symbols (objfile); } /* Call predecessor on chain, if any. */ - if (remote_new_objfile_chain != 0 && - remote_desc == 0) + if (remote_new_objfile_chain) remote_new_objfile_chain (objfile); } -- Dr. Ulrich Weigand Linux on zSeries Development Ulrich.Weigand@de.ibm.com