This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch libiberty include]: Add additional helper functions for directory-separator searching


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]