Re: [patch] IS_ABSOLUTE_PATH to handle both DOS and POSIX path st yles

Eli Zaretskii
2008-01-07T21:32:07Z

> Date: Mon, 7 Jan 2008 09:35:30 -0800
> From: "Doug Evans" <dje@google.com>
> Cc: drow@false.org, gdb-patches@sources.redhat.com, ARistovski@qnx.com, gcc-patches@gcc.gnu.org, RMansfield@qnx.com
>
> On Jan 6, 2008 8:17 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > > Date: Sun, 6 Jan 2008 13:07:25 -0800
> > > From: "Doug Evans" <dje@google.com>
> > > Cc: drow@false.org, gdb-patches@sources.redhat.com, ARistovski@qnx.com,
> > > gcc-patches@gcc.gnu.org, RMansfield@qnx.com
> > >
> > > What would the option apply to? How would the user know when and when
> > > not to use it?
> >
> > I don't really understand the question. How would the user know when
> > to use any other option? If they read the documentation and
> > understand the issues, they will know.
>
> I realize the question may sound odd. I asked it because the range to
> which the option may apply seems vast, whereas the range to which it
> will be applied (AIUI) seems small, leading to excessive confusion.

Many GDB options are used only in very rare cases. That doesn't make
them less useful: when you are in that rare situation, these options
are a godsend.

> Perhaps I should have written "gdb
> prog.with.other.path.format.in.debug.info". :-)
> As a datapoint, and to give some context for the above, I patched
> filenames.h to print a message whenever IS_ABSOLUTE_PATH is called.
>
> dje@ruffy:~$ ./gdb -nx hello
> GNU gdb 6.7.50.20080104-cvs
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-linux"...
> IS_ABSOLUTE_PATH (/home/dje/hello.x32)
> IS_ABSOLUTE_PATH (/home/dje/hello.x32)
> IS_ABSOLUTE_PATH (start.S)
> IS_ABSOLUTE_PATH (../sysdeps/i386/elf/start.S)
> IS_ABSOLUTE_PATH (crti.S)
> IS_ABSOLUTE_PATH (/build/buildd/glibc-2.3.6/build-tree/i386-libc/csu/crti.S)
> IS_ABSOLUTE_PATH (hello.c)
> IS_ABSOLUTE_PATH (hello.c)
> IS_ABSOLUTE_PATH (crtn.S)
> IS_ABSOLUTE_PATH (/build/buildd/glibc-2.3.6/build-tree/i386-libc/csu/crtn.S)

What GDB code causes these calls, and why?