This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
wrong symbol type info in solaris with gdb 6.0/6.1
- From: "Sunil Alankar" <sunil dot alankar at CoWare dot com>
- To: "Gdb at Sources dot Redhat. Com" <gdb at sources dot redhat dot com>
- Date: Mon, 7 Jun 2004 17:55:34 -0700
- Subject: wrong symbol type info in solaris with gdb 6.0/6.1
Hello,
I am seeing this problem that I am trying to debug. Any help is greatly
appreciated.
OS: sparc/solaris 2.8
Compiler: gcc-2.95.3
debug format: stabs
I have a number of libraries that are linked in to the executable program.
One of the libraries contain some functions that I need to execute using gdb
call command. The problem is, gdb fails to call the functions depending on
the position of the library provided to the linker.
If the library (libfoo.a) is specified ahead of other libraries, It works
correctly. If I test the type of the function by ptype 'foo(void)'
It gives me
type = char *(void)
which is correct
Now, if the library is linked after many others,
The call commands fails and ptype also shows:
type = struct <unknown> (void)
I did some debugging and looks like the target_type for the symbol is set to
TYPE_CODE_UNDEF in the error case whereas in the first case, it is properly
set to type TYPE_CODE_PTR.
Unfortunately I can not isolate a test case to reproduce. Could any one tell
me atleast where to look further. This problem does not appear in Linux.
--Sunil