From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29415 invoked by alias); 22 Feb 2003 02:04:08 -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 29407 invoked from network); 22 Feb 2003 02:04:07 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 22 Feb 2003 02:04:07 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h1M247N16970 for ; Fri, 21 Feb 2003 21:04:07 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1M247f16372; Fri, 21 Feb 2003 21:04:07 -0500 Received: from localhost.localdomain (vpn50-17.rdu.redhat.com [172.16.50.17]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1M246t03321; Fri, 21 Feb 2003 21:04:07 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h1M241Y18827; Fri, 21 Feb 2003 19:04:01 -0700 Date: Sat, 22 Feb 2003 02:04:00 -0000 From: Kevin Buettner Message-Id: <1030222020400.ZM18826@localhost.localdomain> In-Reply-To: "Kris Warkentin" "patch to allow target defined solib search method" (Feb 21, 5:27pm) References: <001101c2d9f8$7a7303f0$2a00a8c0@dash> To: "Kris Warkentin" , Subject: Re: patch to allow target defined solib search method MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-02/txt/msg00538.txt.bz2 On Feb 21, 5:27pm, Kris Warkentin wrote: > The following patch allows a target to define a function for finding shared > libraries. This prevents target back ends from having to monkey with > solib-search-path. > > ChangeLog entry > > Add target function hook for searching out solibs. > * solib.c: solib_open(): call search function after failing with > solib-search-path > * solist.h: struct target_so_ops: add find_and_open_solib function hook, > create define > TARGET_SO_FIND_AND_OPEN_SOLIB Watch the formatting, capitalization, and punctuation on the ChangeLog entry. It should look something like this: Add target function hook for searching out solibs: * 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. That initial comment, "Add target function hook for searching out solibs" isn't really necessary, but there is precedent for it. A tab character (for indentation) should start each line. I think some folks use 8 spaces, but that's the exception rather than the rule. Sentence-like constructs should begin with a capital letter and end with a period. > + if (found_file < 0 && TARGET_SO_FIND_AND_OPEN_SOLIB) I'm still mulling over whether or not I like this construct. I thought there was a precedent for it in solib.c, but I couldn't find one. I think I do something similar in solib-svr4.c though. > + found_file = TARGET_SO_FIND_AND_OPEN_SOLIB (in_pathname, O_RDONLY, > &temp_pathname); Try to keep the lines less than 80 characters. > + /* 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); Likewise here. Otherwise okay. I notice that your name isn't in the "Write After Approval" list in the maintainers file. Assuming that your assignment is in order, you should commit a change adding yourself to that list. (You should also post a patch.) Then, once the nits that I mentioned above are fixed, you can commit this patch. Thanks, Kevin