This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/12911] New: Cannot Debug Custom Shared Library (CentOS5.6/gdb 7.2)
- From: "dennis.mcwherter at gmail dot com"<sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sat, 18 Jun 2011 19:35:10 +0000
- Subject: [Bug c++/12911] New: Cannot Debug Custom Shared Library (CentOS5.6/gdb 7.2)
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12911
Summary: Cannot Debug Custom Shared Library (CentOS 5.6/gdb
7.2)
Product: gdb
Version: 7.2
Status: NEW
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@sourceware.org
ReportedBy: dennis.mcwherter@gmail.com
Hello,
I have been trying now for several days (without any bit of success) to step
through a shared library I am building - I set a null pointer in the library to
force a core dump and to see whether or not I was able to debug - I cannot. I
can step through all the functions in my dummy executable binary, but when I
get to the shared library, it fails.
I am building the library (and all its objects) using:
CFLAGS=-Wall -O0 -g3 -fPIC
and the executable binary with this:
CFLAGS=-Wall -O0 -g3
Now, when I load everything in gdb, it says that the symbols are loaded, but I
cannot step into the function. Here is an example:
(gdb) info sharedlibrary
>From To Syms Read Shared Object Library
0x005577f0 0x0056cf1f Yes (*) /lib/ld-linux.so.2
0x00cb9f20 0x00cf59e4 Yes (*) /usr/lib/libGL.so.1
0x00738720 0x009abc04 Yes
/home/raged/MyLIB/memtest/../lib/libMyLIB.so.0
0x0273ec50 0x027ba174 Yes (*) /usr/lib/libstdc++.so.6
0x00113410 0x0012e594 Yes (*) /lib/libm.so.6
0x02502660 0x02509f34 Yes (*) /lib/libgcc_s.so.1
0x0014ec80 0x0024a290 Yes (*) /lib/libc.so.6
0x002a6f70 0x003378a4 Yes (*) /usr/lib/libX11.so.6
0x003975e0 0x003a1324 Yes (*) /usr/lib/libXext.so.6
0x02b8fa80 0x02b92734 Yes (*) /usr/lib/libXxf86vm.so.1
0x003a9210 0x003b4a74 Yes (*) /lib/libpthread.so.0
0x003bea70 0x003bfaa4 Yes (*) /lib/libdl.so.2
0x00d97b10 0x00d9b444 Yes (*) /usr/lib/libdrm.so.2
0x003c3950 0x003c4604 Yes (*) /usr/lib/libXau.so.6
0x003c6e30 0x003c8a74 Yes (*) /usr/lib/libXdmcp.so.6
(*): Shared library is missing debugging information.
Now, when I attempt to debug the core file, here is the problem:
Reading symbols from /home/raged/MyLIB/memtest/memtest...done.
[New Thread 7800]
Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libGL.so.1
Reading symbols from /home/raged/MyLIB/memtest/../lib/libMyLIB.so.0...done.
Loaded symbols for /home/raged/MyLIB/memtest/../lib/libMyLIB.so.0
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
As you can see, the library symbols are indeed loaded, but I cannot step into
it (or debug it at all for that matter). Any ideas as to why this may happen?
Regards,
Dennis McWherter
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.