On 11/11/2013 Monday 1:44 AM, Ian Lance Taylor wrote:
On Sun, Nov 10, 2013 at 7:08 AM, aking <jinxin16897123@xxxxxxx> wrote:
Hi, all
I'm compiling project using gcc, it generate dwarf info :
...
<74cb> DW_AT_name : (indirect string, offset: 0x1a6a): board.c
<74cf> DW_AT_comp_dir : (indirect string, offset: 0x2689):
/root/file/u-boot/u-boot-am33x/arch/arm/lib
...
what option should be add to change DW_AT_name from "board.c" to
"/root/file/u-boot/u-boot-am33x/arch/arm/lib/board.c" ? which means
DW_AT_name contains full path of the source file?
Write
gcc -c -g /root/file/u-boot/u-boot-am33x/arch/arm/lib/board.c
That is, pass the filename as an absolute path when running gcc.
I'll note that this is an odd request. The comp_dir attribute is
standard DWARF. Why do you want to avoid it?
Ian
Thank you very much.
I'm using a debugger which open source file depends on DW_AT_name
attribute which debugger cannot open it , it always show me message box
to choose the file location, it really trouble me.
you really did me a big favor.
--
Best Regards
aking_jin