I built gcc (4.4.4) from the original source without applying the
patches and was able to compile my test program, generate a core and
then reload the core in gdb and get a backtrace. I then had two
different versions of my compiled program. I did "objdump -s" on each
and noticed this difference:
The version which doesn't produce a backtrace has two extra sections
".gnu.hash" and ".note.gnu.build-id".
If I do "objcopy -R .gnu.hash singlethread singlethread.nognuhash" to
remove the .gnu.hash section from the version which "didn't work" I am
able to produce a core file where I can get a backtrace.
gdb ./singlethread.nognuhash
attach 2187
gcore core.nognuhash
gdb ./singlethread.nognuhash core.nognuhash
...
#0 0x00007fbf157c6eaf in _IO_new_file_xsputn (f=0x7fbf15ad1780, data=0x400655,
n=9) at fileops.c:1383
1383 fileops.c: No such file or directory.
in fileops.c
(gdb) bt
#0 0x00007fbf157c6eaf in _IO_new_file_xsputn (f=0x7fbf15ad1780, data=0x400655,
n=9) at fileops.c:1383
#1 0x00007fbf157994ec in _IO_vfprintf_internal (s=0x7fbf15ad1780,
format=0x40064c "X is now %d.\n", ap=0x7fffcfbffa40) at vfprintf.c:1333
#2 0x00007fbf157a453a in __printf (format=0x400655 "%d.\n") at printf.c:35
#3 0x0000000000400551 in main () at singlethread2.c:7
I notice there are two patches and am wondering if one of these broke the gdb
core functionality
gcc-hash-style-both.diff
gcc-hash-style-gnu.diff
I will remove those from the series and rebuild the ubuntu patched gcc package.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/680588
Title:
gcore produces core file without backtrace capability
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs