From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28277 invoked by alias); 13 Jul 2002 22:39:02 -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 28262 invoked from network); 13 Jul 2002 22:39:02 -0000 Received: from unknown (HELO racerx.ixiacom.com) (64.60.75.69) by sources.redhat.com with SMTP; 13 Jul 2002 22:39:02 -0000 Received: from ixiacom.com (dank.ixiacom.com [192.168.3.117]) by racerx.ixiacom.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 3PQA46LL; Sat, 13 Jul 2002 15:37:11 -0700 Message-ID: <3D30B60D.3040905@ixiacom.com> Date: Sat, 13 Jul 2002 15:39:00 -0000 From: Dan Kegel User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3 MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: [patch, rfc] configure option for default value of solib-search-path Content-Type: multipart/mixed; boundary="------------090701010107050500010001" X-SW-Source: 2002-07/txt/msg00144.txt.bz2 This is a multi-part message in MIME format. --------------090701010107050500010001 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 790 In my cross-development environment, I need to type set solib-search-path /opt/hardhat/devkit/ppc/405/powerpc-hardhat-linux/lib:/opt/hardhat/devkit/ppc/405/powerpc-hardhat-linux/usr/lib:/opt/hardhat/devkit/ppc/405/target/lib:/opt/hardhat/devkit/ppc/405/target/usr/lib when I start gdb. That's just a bit awkward; I'd prefer to have it default to the proper value, just like the Montavista version does. Here's a patch that lets you set the initial value of this patch at configure time. I haven't sent in a copyright assignment, so this won't be accepted into the gdb tree, but I'd appreciate comments on whether this is the right approach. If it is, I'll gladly get the copyright asignment paperwork going. (Note: after applying the patch, you need to run autoconf.) Thanks, Dan --------------090701010107050500010001 Content-Type: text/plain; name="solib-path.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="solib-path.patch" Content-length: 1715 --- src/gdb/solib.c.orig Sat Jul 13 12:13:51 2002 +++ src/gdb/solib.c Sat Jul 13 12:15:23 2002 @@ -65,7 +65,11 @@ /* If non-empty, this is a search path for loading non-absolute shared library symbol files. This takes precedence over the environment variables PATH and LD_LIBRARY_PATH. */ -static char *solib_search_path = NULL; +#ifdef CONFIG_SOLIB_SEARCH_PATH + static char *solib_search_path = CONFIG_SOLIB_SEARCH_PATH; +#else + static char *solib_search_path = NULL; +#endif /* --- src/gdb/acconfig.h.orig Sat Jul 13 12:53:20 2002 +++ src/gdb/acconfig.h Sat Jul 13 12:54:46 2002 @@ -176,3 +176,7 @@ /* nativefile */ #undef GDB_NM_FILE + +/* Define when building cross gcc for particular cross-development environment */ +#undef CONFIG_SOLIB_SEARCH_PATH + --- src/gdb/config.in.orig Thu Apr 11 11:32:51 2002 +++ src/gdb/config.in Sat Jul 13 12:55:42 2002 @@ -186,6 +189,9 @@ /* nativefile */ #undef GDB_NM_FILE + +/* Define when building cross gcc for particular cross-development environment */ +#undef CONFIG_SOLIB_SEARCH_PATH /* Define if you have the __argz_count function. */ #undef HAVE___ARGZ_COUNT --- src/gdb/configure.in.orig Sat Jul 13 12:47:13 2002 +++ src/gdb/configure.in Sat Jul 13 12:55:33 2002 @@ -932,6 +932,13 @@ ],) +AC_ARG_WITH(solib-search-path, [ --with-solib-search-path=DIR:DIR:DIR... Directories to search for shared libraries on host], with_solib_seach_path=${withval}) + +if test x"${with_solib_seach_path}" != x ; then + AC_DEFINE_UNQUOTED(CONFIG_SOLIB_SEARCH_PATH,"$with_solib_seach_path") +fi +AC_SUBST(CONFIG_SOLIB_SEARCH_PATH) + AC_ARG_ENABLE(gdbtk, [ --enable-gdbtk Enable GDBTK GUI front end], [case "${enableval}" in --------------090701010107050500010001--