[patch] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename)

Eli Zaretskii eliz@gnu.org
Mon Dec 5 03:54:00 GMT 2011


> From: Pedro Alves <pedro@codesourcery.com>
> Date: Sun, 4 Dec 2011 21:00:16 +0000
> Cc: hal9000ed2k@gmail.com,
>  tromey@redhat.com,
>  dje@google.com,
>  gdb-patches@sourceware.org,
>  pmuldoon@redhat.com,
>  brobecker@adacore.com,
>  drow@false.org,
>  jan.kratochvil@redhat.com
> 
> $ pwd
> /foo/bar
> $ gcc a/b.c
> 
> If the debug info supports a notion of compilation directory (DW_AT_comp_dir
> in dwarf), the full name is /foo/bar/a/b.c and the compilation
> directory is /foo/bar.  The no-compilation-directory option
> would the show a/b.c .
> 
> I'd rather have a positive option, rather than a negative one (no-|without-),
> but I'm failing to find a better name.  I thought of "relative",
> but that's not entirely accurate -- it can be a full path too.  I can live
> with no-compilation-directory.  Just saying I tried and failed.

How about `relative-to-compilation-directory'?  Or just `relative'
(since we use `full', not `full-absolute-file-name')?

And what about the question I asked regarding the default?  AFAIK, the
current behavior is equivalent to `basename', not to `full'.

Thanks.



More information about the Gdb-patches mailing list