From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18325 invoked by alias); 8 Mar 2011 12:48:19 -0000 Received: (qmail 18297 invoked by uid 22791); 8 Mar 2011 12:48:18 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Mar 2011 12:48:14 +0000 Received: by qwd7 with SMTP id 7so5007598qwd.0 for ; Tue, 08 Mar 2011 04:48:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.102.165 with SMTP id g37mr3946371qco.120.1299588492008; Tue, 08 Mar 2011 04:48:12 -0800 (PST) Received: by 10.229.89.197 with HTTP; Tue, 8 Mar 2011 04:48:11 -0800 (PST) In-Reply-To: <201103081243.34340.pedro@codesourcery.com> References: <201103081243.34340.pedro@codesourcery.com> Date: Tue, 08 Mar 2011 13:33:00 -0000 Message-ID: Subject: Re: [patch libiberty include]: Add additional helper functions for directory-separator searching From: Kai Tietz To: Pedro Alves Cc: gcc-patches@gcc.gnu.org, Eli Zaretskii , binutils@sourceware.org, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00532.txt.bz2 2011/3/8 Pedro Alves : > On Tuesday 08 March 2011 12:01:24, Kai Tietz wrote: >> See for example remote-fileio.c in remote_fileio_extract_ptr_w_len() >> as an example. There is more then one use-case. > > That '/' has nothing to do with path separators. =A0It's simply > a separator between a pointer and a length fields. =A0E.g., > > =A0@item Request: > =A0@samp{Fopen,@var{pathptr}/@var{len},@var{flags},@var{mode}} > > @var{pathptr} is a pointer that points to the real path > in the inferior's memory, not a path string. > > -- > Pedro Alves > Well, a better example is elfstab_offset_sections() in elfread.c. Another is in find_file_and_directory() in dwarf2read.c file. Regards, Kai