This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename)
- From: Doug Evans <dje at google dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Pedro Alves <pedro at codesourcery dot com>, hal9000ed2k at gmail dot com, tromey at redhat dot com, gdb-patches at sourceware dot org, pmuldoon at redhat dot com, brobecker at adacore dot com, drow at false dot org, jan dot kratochvil at redhat dot com
- Date: Tue, 6 Dec 2011 09:32:48 -0800
- Subject: Re: [patch] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename)
- References: <BANLkTinD+9_Mkug8o2VhZ03L6XSriL_RKQ@mail.gmail.com> <83fwgzbrp9.fsf@gnu.org> <E1RXQvX-00045Q-Hk@fencepost.gnu.org> <201112061249.47758.pedro@codesourcery.com> <E1RXugC-0005av-VR@fencepost.gnu.org>
On Tue, Dec 6, 2011 at 5:03 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Pedro Alves <pedro@codesourcery.com>
>> Date: Tue, 6 Dec 2011 12:49:47 +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
>>
>> > 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" ?
>
> No, it's `full', because the compile directory was "/foo/bar".
>
>> Or maybe your compiler didn't emit the comp_dir attribute in the
>> debug info.
>
> "My compiler" in this case identifies itself as
>
> ?gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
>
> I'd be surprised if this version omits comp_dir, but if someone tells
> me how to check that, I will.
>
>> I don't really know what is the current default, and I'm now
>> confused too. ?:-)
>
> Then I'm in good company ;-)
>
>> > 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
>
> Then maybe "as-recorded"? ?Meaning that this is how the compiler
> recorded the file name in the debug info?
I like that.
Something along the lines of "set backtrace file-name as-recorded|full|base" ?