From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10060 invoked by alias); 22 Feb 2003 04:33:20 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10053 invoked from network); 22 Feb 2003 04:33:20 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by 172.16.49.205 with SMTP; 22 Feb 2003 04:33:20 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id XAA06675; Fri, 21 Feb 2003 23:21:28 -0500 Received: from dash ([192.168.20.31]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id XAA09081; Fri, 21 Feb 2003 23:33:17 -0500 Message-ID: <004501c2da2b$efdb49d0$2a00a8c0@dash> From: "Kris Warkentin" To: "Kevin Buettner" , References: <001101c2d9f8$7a7303f0$2a00a8c0@dash> <1030222020400.ZM18826@localhost.localdomain> Subject: Re: patch to allow target defined solib search method Date: Sat, 22 Feb 2003 04:33:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2003-02/txt/msg00539.txt.bz2 Here you go. I chopped up the long lines and used your formatting for the ChangeLog. I also added myself to MAINTAINERS at the bottom of the patch. Makes sense since I'm the gdb guy at QNX now. Sorry about the missing tabs in the ChangeLog. Outlook doesn't DO tabs...I guess Microsoft doesn't believe in them. :-P Would it be better if I just attached text files next time? cheers, Kris ChangeLog Entry * solib.c (solib_open): Call target specific search function after failing with solib-search-path. * solist.h (struct target_so_ops): Add find_and_open_solib(). (TARGET_SO_FIND_AND_OPEN_SOLIB): Define. Index: solib.c =================================================================== RCS file: /cvs/src/src/gdb/solib.c,v retrieving revision 1.54 diff -u -r1.54 solib.c --- solib.c 20 Feb 2003 18:25:27 -0000 1.54 +++ solib.c 22 Feb 2003 04:21:45 -0000 @@ -160,6 +160,11 @@ 1, lbasename (in_pathname), O_RDONLY, 0, &temp_pathname); + /* If not found, try to use target supplied solib search method */ + if (found_file < 0 && TARGET_SO_FIND_AND_OPEN_SOLIB != NULL) + found_file = TARGET_SO_FIND_AND_OPEN_SOLIB + (in_pathname, O_RDONLY, &temp_pathname); + /* If not found, next search the inferior's $PATH environment variable. */ if (found_file < 0 && solib_search_path != NULL) found_file = openp (get_in_environ (inferior_environ, "PATH"), Index: solist.h =================================================================== RCS file: /cvs/src/src/gdb/solist.h,v retrieving revision 1.7 diff -u -r1.7 solist.h --- solist.h 21 Oct 2001 19:20:30 -0000 1.7 +++ solist.h 22 Feb 2003 04:21:45 -0000 @@ -99,6 +99,12 @@ /* Determine if PC lies in the dynamic symbol resolution code of the run time loader */ int (*in_dynsym_resolve_code) (CORE_ADDR pc); + + /* Extra hook for finding and opening a solib. Convenience function + for remote debuggers finding host libs */ + int (*find_and_open_solib) (char *soname, + unsigned o_flags, char **temp_pathname); + }; void free_so (struct so_list *so); @@ -122,5 +128,7 @@ (current_target_so_ops->open_symbol_file_object) #define TARGET_SO_IN_DYNSYM_RESOLVE_CODE \ (current_target_so_ops->in_dynsym_resolve_code) +#define TARGET_SO_FIND_AND_OPEN_SOLIB \ + (current_target_so_ops->find_and_open_solib) #endif Index: MAINTAINERS =================================================================== RCS file: /cvs/src/src/gdb/MAINTAINERS,v retrieving revision 1.223 diff -u -r1.223 MAINTAINERS --- MAINTAINERS 4 Feb 2003 23:26:43 -0000 1.223 +++ MAINTAINERS 22 Feb 2003 04:21:45 -0000 @@ -200,6 +200,8 @@ Peter Schauer Peter.Schauer@regent.e-technik.tu-muenchen.de Solaris/SPARC native & host (devolved) Michael Snyder msnyder@redhat.com +QNX Neutrino i386 native & remote + Kris Warkentin kewarken@qnx.com