tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gdb and libc debug symbols



> Look at your build log and see if -g was passed somehow to make these.
That in fact does not seem to happen:
libc.so.12.181 is, as per ``build.sh -U distribution'', built using this:
| /mnt/big/frzobj614/tooldir.NetBSD-6.1.2-amd64/bin/x86_64--netbsd-gcc 
-nodefaultlibs -Wl,-x -shared -Wl,-soname,libc.so.12 -Wl,--warn-shared-textrel 
-Wl,-z,initfirst  --sysroot=/mnt/big/frzobj614/destdir.amd64   -o 
libc.so.12.181  -Wl,-rpath,/lib  -L=/lib  -Wl,--whole-archive libc_pic.a 
-Wl,--no-whole-archive -lgcc 

Debug symbols file is created and installed here:
| (  /mnt/big/frzobj614/tooldir.NetBSD-6.1.2-amd64/bin/x86_64--netbsd-objcopy 
--only-keep-debug libc.so.12.181 libc.so.12.181.debug  && 
/mnt/big/frzobj614/tooldir.NetBSD-6.1.2-amd64/bin/x86_64--netbsd-objcopy 
--strip-debug -p -R .gnu_debuglink  --add-gnu-debuglink=libc.so.12.181.debug 
libc.so.12.181  ) || (rm -f libc.so.12.181.debug; false)

And later, again:
| /mnt/big/frzobj614/tooldir.NetBSD-6.1.2-amd64/bin/x86_64--netbsd-gcc 
-nodefaultlibs -Wl,-x -shared -Wl,-soname,libc.so.12 -Wl,--warn-shared-textrel 
-Wl,-z,initfirst  -m32 --sysroot=/mnt/big/frzobj614/destdir.amd64   -o 
libc.so.12.181  -Wl,-rpath,/usr/lib/i386  -L=/usr/lib/i386  -Wl,--whole-archive 
libc_pic.a -Wl,--no-whole-archive -m32 -lgcc 
[...]
|(  /mnt/big/frzobj614/tooldir.NetBSD-6.1.2-amd64/bin/x86_64--netbsd-objcopy 
--only-keep-debug libc.so.12.181 libc.so.12.181.debug  && 
/mnt/big/frzobj614/tooldir.NetBSD-6.1.2-amd64/bin/x86_64--netbsd-objcopy 
--strip-debug -p -R .gnu_debuglink  --add-gnu-debuglink=libc.so.12.181.debug 
libc.so.12.181  ) || (rm -f libc.so.12.181.debug; false)


> I wonder if you need to set DBG somehow also, to specify the flags that
> go in the debug lib.  But it seems it should default to the right thing.
Will try DBG=-g and report back, thanks.


Home | Main Index | Thread Index | Old Index