From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20113 invoked by alias); 8 Mar 2011 13:33:12 -0000 Received: (qmail 20097 invoked by uid 22791); 8 Mar 2011 13:33:11 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Mar 2011 13:33:06 +0000 Received: (qmail 18343 invoked from network); 8 Mar 2011 13:33:04 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Mar 2011 13:33:04 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch libiberty include]: Add additional helper functions for directory-separator searching Date: Tue, 08 Mar 2011 14:30:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-27-generic; KDE/4.6.1; x86_64; ; ) Cc: Kai Tietz , gcc-patches@gcc.gnu.org, Eli Zaretskii , binutils@sourceware.org References: <201103081243.34340.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201103081333.03177.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: 2011-03/txt/msg00534.txt.bz2 On Tuesday 08 March 2011 12:48:11, Kai Tietz wrote: > Well, a better example is elfstab_offset_sections() in elfread.c. /* The ELF symbol info doesn't include path names, so strip the path (if any) from the psymtab filename. */ while (0 != (p = strchr (filename, '/'))) filename = p + 1; Looks like its looking for the last path separator, so it might as well use filename_dirrchr instead. > Another is in find_file_and_directory() in dwarf2read.c file. Workaround for Irix. Certainly that '/' should not depend on the host gdb is running on. -- Pedro Alves