From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19978 invoked by alias); 19 Oct 2006 14:30:11 -0000 Received: (qmail 19892 invoked by uid 22791); 19 Oct 2006 14:30:09 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 19 Oct 2006 14:29:57 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id C06BB48CFCC; Thu, 19 Oct 2006 10:29:55 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06361-01-7; Thu, 19 Oct 2006 10:29:55 -0400 (EDT) Received: from takamaka.act-europe.fr (joel.gnat.com [205.232.38.116]) by nile.gnat.com (Postfix) with ESMTP id 99FC548CE9A; Thu, 19 Oct 2006 10:29:55 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 745F647F01; Thu, 19 Oct 2006 10:29:51 -0400 (EDT) Date: Thu, 19 Oct 2006 14:30:00 -0000 From: Joel Brobecker To: Ulrich Weigand Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: [RFC] Replace deprecated_target_new_objfile_hook by observer? Message-ID: <20061019142951.GB1338@adacore.com> References: <20061017233524.GA18064@nevyn.them.org> <200610181629.k9IGT2ZX000588@d12av02.megacenter.de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200610181629.k9IGT2ZX000588@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.4i 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/msg00242.txt.bz2 Ulrich, > To fix this, I'm currently using this patch, which attempts to express > more directly that linux-thread-db should not be used if the target is > remote: Would you mind submitting your change for inclusion? I could then leverage off of this change for the transition to observers. Thanks! > > diff -urN gdb-orig/gdb/linux-thread-db.c gdb-6.5/gdb/linux-thread-db.c > --- gdb-orig/gdb/linux-thread-db.c 2006-05-06 00:42:43.000000000 +0200 > +++ gdb-6.5/gdb/linux-thread-db.c 2006-09-25 02:12:11.382901136 +0200 > @@ -669,6 +669,10 @@ > 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); > > diff -urN gdb-orig/gdb/remote.c gdb-6.5/gdb/remote.c > --- gdb-orig/gdb/remote.c 2006-05-05 22:08:45.000000000 +0200 > +++ gdb-6.5/gdb/remote.c 2006-09-25 02:12:11.449890952 +0200 > @@ -5466,8 +5466,7 @@ > 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); > } > > Does this look reasonable? > > Bye, > Ulrich > > -- > Dr. Ulrich Weigand > Linux on zSeries Development > Ulrich.Weigand@de.ibm.com -- Joel