From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25072 invoked by alias); 12 Aug 2002 16:40:57 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 24835 invoked from network); 12 Aug 2002 16:40:53 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 12 Aug 2002 16:40:53 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g7CGRLl19195; Mon, 12 Aug 2002 12:27:21 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g7CGenu00921; Mon, 12 Aug 2002 12:40:49 -0400 Received: from romulus.sfbay.redhat.com (IDENT:oaq2i8TDZlqGdfUnyW5YshFnfzm1IRa6@romulus.sfbay.redhat.com [172.16.27.251]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g7CGele13496; Mon, 12 Aug 2002 09:40:47 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g7CGeji32289; Mon, 12 Aug 2002 09:40:45 -0700 Date: Mon, 12 Aug 2002 09:40:00 -0000 From: Kevin Buettner Message-Id: <1020812164045.ZM32288@localhost.localdomain> In-Reply-To: Andrew Cagney "Re: gdb/633: fully qualified pathnames in solib_map_sections() and remote debugging" (Aug 12, 12:19pm) References: <20020806100634.11483.qmail@sources.redhat.com> <20020806132047.GA16450@nevyn.them.org> <1020809231206.ZM11775@localhost.localdomain> <20020812032527.GA3838@nevyn.them.org> <3D57C611.4010403@ges.redhat.com> <20020812143803.GA25086@nevyn.them.org> <3D57CF1A.4070405@ges.redhat.com> <1020812154849.ZM31876@localhost.localdomain> <3D57E028.8030809@ges.redhat.com> To: Andrew Cagney , Kevin Buettner Subject: Re: gdb/633: fully qualified pathnames in solib_map_sections() and remote debugging Cc: Daniel Jacobowitz , jorma.laaksonen@hut.fi, gdb-gnats@sources.redhat.com, gdb@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-08/txt/msg00104.txt.bz2 On Aug 12, 12:19pm, Andrew Cagney wrote: > > At the moment, I like the first approach better because it's simpler. > > I'd prefer that we wait on the more complicated approach until a need > > is demonstrated for the additional complexity. > > > > > >> Adding a local/remote test is going to be easier. > > > > > > Do we already have such a test? > > Well, looking at some finally dead hacks, .... > > int > remote_Z_write_wp_packet_supported_p (void) > { > struct remote_state *rs = get_remote_state (); > /* Don't even think about it if the remote target isn't selected. */ > /* FIXME: cagney/2002-05-19: This shouldn't be necessary - the > WATCHPOINT methods should be in the target vector. Ulgh! */ > if (target_shortname == NULL > || strcmp (target_shortname, "remote") != 0) > return 0; > > notice that the problem it was trying to avoid was with ``target sim''. > So in the above the question is no longer local/remote but local VS > remote VS sim VS .... Actually, I think it's probably better to recast the question in terms of native vs. non-native targets. For native targets, I think it's appropriate for solib_open() to examine the host environment variables. (Though there are still cases where even this is wrong.) For non-native targets, I think the user should be required to have settings for solib-absolute-prefix and solib-search-path. (Though as Daniel pointed out, there are cases when it would be okay to use the host's environment variables.) Kevin