This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename)


> Date: Sun, 25 Mar 2012 23:26:50 +0400
> From: iam ahal <hal9000ed2k@gmail.com>
> Cc: tromey@redhat.com, jan.kratochvil@redhat.com, palves@redhat.com, 
> 	dje@google.com, gdb-patches@sourceware.org, pmuldoon@redhat.com, 
> 	brobecker@adacore.com, drow@false.org, asmwarrior@gmail.com
> 
> The difference between "basename" and "relative" is:
> 
> "basename" option just cuts directory part from 'DW_AT_name'.
> "relative" option cuts 'DW_AT_comp_dir' part from 'DW_AT_name' If and
> only if 'DW_AT_name' contains 'DW_AT_comp_dir' part at the beginning.
> 
> Quite frankly, I don't know how exactly make records like this:
> 
>     <11>   DW_AT_name        : (indirect string, offset: 0x1e):
> /home/username/contrib/test/prog.c
>     <15>   DW_AT_comp_dir    : (indirect string, offset: 0x0):
> /home/username/contrib/

Thanks.  So I understand that my guess was correct, and "relative" is
relative to the compilation directory.  That is, in the example above,
"basename" will give you prog.c, while "relative" will give
"test/prog.c".  Is that correct?


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