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

Pedro Alves pedro@codesourcery.com
Tue Dec 6 13:03:00 GMT 2011


On Monday 05 December 2011 05:17:19, Eli Zaretskii wrote:
> > Date: Mon, 05 Dec 2011 05:52:34 +0200
> > From: Eli Zaretskii <eliz@gnu.org>

> > And what about the question I asked regarding the default?  AFAIK, the
> > current behavior is equivalent to `basename', not to `full'.
> 
> I think I know the answer.  We show by default whatever the compiler
> saw on its command line when it compiled the source file.  E.g., if
> the command was
> 
>   gcc -c ... /foo/bar/baz.c
> 
> then GDB will show "/foo/bar/baz.c", but if the compilation command
> was
> 
>   gcc -c ... baz.c
> 
> then GDB will show "baz.c".

> 
> Is that correct?  If so, calling this `full' is misleading, I think,

If that is correct, than the default isn't "full", but
the proposed "no-compile-directory" ?  Or maybe your compiler didn't emit
the comp_dir attribute in the debug info.  I don't really know what
is the current default, and I'm now confused too.  :-)

> unless we really change GDB to always show a full absolute file name
> there.  If we don't want to change, I suggest to call it `normal' or
> maybe `default' (with explanation along the above lines).

I don't think normal or default are good names (with IMO default being
a really bad name), because that'll confuse things a lot if we ever 
flip the default.

-- 
Pedro Alves



More information about the Gdb-patches mailing list