wrong symbol type info in solaris with gdb 6.0/6.1

Sunil Alankar sunil.alankar@CoWare.com
Tue Jun 8 00:57:00 GMT 2004


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



More information about the Gdb mailing list