From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4108 invoked by alias); 11 May 2009 13:13:04 -0000 Received: (qmail 4089 invoked by uid 22791); 11 May 2009 13:13:03 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 May 2009 13:12:59 +0000 Received: (qmail 13258 invoked from network); 11 May 2009 13:12:57 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 May 2009 13:12:57 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1 Date: Mon, 11 May 2009 13:13:00 -0000 User-Agent: KMail/1.9.10 Cc: Paul Pluzhnikov , Joel Brobecker , Hui Zhu , tromey@redhat.com, Thiago Jung Bauermann , Eli Zaretskii , Daniel Jacobowitz References: <8ac60eac0904201019g7ba8056bx5e84e6bfdf5935d8@mail.gmail.com> <8ac60eac0904301618j61051e9du38b34afbc7ed64a3@mail.gmail.com> <8ac60eac0904301719w33175de2w8d1d0fd80bf0feb4@mail.gmail.com> In-Reply-To: <8ac60eac0904301719w33175de2w8d1d0fd80bf0feb4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905111412.59493.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00213.txt.bz2 On Friday 01 May 2009 01:19:43, Paul Pluzhnikov wrote: > Sorry, missed "space before parenth": > > < + return libpthread_name_p(so->so_name); > > + return libpthread_name_p (so->so_name); > > Fix attached. On Friday 01 May 2009 01:19:43, Paul Pluzhnikov wrote: > handle = dlopen (library, RTLD_NOW); I wonder if making this RTLD_LAZY until you found the correct one wouldn't make sense? > +static int > +thread_db_load_search () ^ (void) (this function could be made to use `openat' at some point, but gdb is already assumes PATH_MAX is largest path possible elsewhere anyway) I also wonder if `set sysroot' should affect this search path: I think not, but I'm not 100% sure. > +int libpthread_name_p (const char *name) > +{ ^ function name at column 0, please. Other that those nits, this version looks good to me. Everyone else has already picked on what else could have been picked on. :-) AFAICS, this version addressed all of Daniel's concerns. Daniel, what do you think? -- Pedro Alves