bug-gdb
[Top][All Lists]
Advanced

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

gdb for sparc64-solaris2.10 and Sun cc 5.7


From: Ken Raeburn
Subject: gdb for sparc64-solaris2.10 and Sun cc 5.7
Date: Tue, 17 Jan 2006 23:30:15 -0500

I configured and built gdb-6.4:

  env CC='cc -xarch=v9 -xs' ../configure --prefix=`pwd`/Install 
--disable-build-warnings sparc64-solaris2.10
  gmake

The --disable-build-warnings was needed, it tried to pass "-W -Wall"
even though the compiler isn't gcc.  The compiler in use is Sun's:

% cc -V
cc: Sun C 5.7 2005/01/07

The "-xs" tells it to retain the debugging info in the executable.

The built gdb (confirmed with "file" it's a 64-bit executable) doesn't
like itself:

% ./gdb ./gdb 
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc64-solaris2.10"...
Setting up the environment for debugging gdb.
During symbol reading, Unknown C++ symbol name `...:p(3,95)'.
During symbol reading, misplaced N_LBRAC entry; discarding local symbols which 
have no enclosing block.
Breakpoint 1 at 0x1000eae74: file ../../gdb/utils.c, line 817.
During symbol reading, unknown symbol type 0xd8.
Breakpoint 2 at 0x100144ddc: file ../../gdb/cli/cli-cmds.c, line 189.
(top-gdb) b main 
Breakpoint 3 at 0x1000da63c: file ../../gdb/gdb.c, line 30.
(top-gdb) run
Starting program: /u1/kr/gdb/gdb-6.4/build/gdb/gdb 
warning: Lowest section in /lib/sparcv9/libdl.so.1 is .dynamic at 
00000000000000e8

Breakpoint 3, main (argc=Cannot access memory at address 0x7ffff4bc
) at ../../gdb/gdb.c:30
30        memset (&args, 0, sizeof args);
(top-gdb) bt
#0  main (argc=Cannot access memory at address 0x7ffff4bc
) at ../../gdb/gdb.c:30
(top-gdb) q
The program is running.  Exit anyway? (y or n) y


The "3,95" symbol appears to be defined thus (from strings and grep):

_pthread_attr:T(3,94)=s8__pthread_attrp:(3,95)=*(0,21),0,64;

Looking at sys/types.h, pthread_attr_t is a typedef for struct
_pthread_attr, which has one field named __pthread_attrp, a pointer to
void.  There are other pthread-related structure types with single
__pthread_*-named fields, but they use this same type:

_pthread_mutexattr:T(3,97)=s8__pthread_mutexattrp:(3,95),0,64;
_pthread_condattr:T(3,99)=s8__pthread_condattrp:(3,95),0,64;
_pthread_rwlockattr:T(3,104)=s8__pthread_rwlockattrp:(3,95),0,64;
:T(3,106)=s8__pthread_barrierattrp:(3,95),0,64;
sigval:T(14,1)=u8sival_int:(0,3),0,32;sival_ptr:(3,95),0,64;
__va_list:t(19,1)=(3,95)
va_list:t(39,1)=(3,95)
bfd_hash_table:T(43,44)=s32table:(43,45)=*(43,41),0,64;size:(0,14),64,32;newfunc:(43,46)=*(43,47)=f(43,41),128,64;memory:(3,95),192,64;
[...]



If I fire up gdb, suspend it, and run gcore on it, gdb doesn't like
that much either:

% ./gdb ./gdb core.19896 
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc64-solaris2.10"...
Core was generated by `./gdb'.
Reading symbols from /lib/sparcv9/libdl.so.1...
warning: Lowest section in /lib/sparcv9/libdl.so.1 is .dynamic at 
00000000000000e8
done.
Loaded symbols for /lib/64/libdl.so.1
Reading symbols from /lib/sparcv9/libcurses.so.1...done.
Loaded symbols for /lib/64/libcurses.so.1
Reading symbols from /lib/sparcv9/libsocket.so.1...done.
Loaded symbols for /lib/64/libsocket.so.1
Reading symbols from /lib/sparcv9/libnsl.so.1...done.
Loaded symbols for /lib/64/libnsl.so.1
Reading symbols from /lib/sparcv9/libm.so.2...done.
Loaded symbols for /lib/64/libm.so.2
Reading symbols from /lib/sparcv9/libc.so.1...done.
Loaded symbols for /lib/64/libc.so.1
Reading symbols from 
/platform/SUNW,Sun-Blade-1500/lib/sparcv9/libc_psr.so.1...done.
Loaded symbols for /platform/SUNW,Sun-Blade-1500/lib/sparcv9/libc_psr.so.1
Reading symbols from /lib/sparcv9/libthread_db.so.1...done.
Loaded symbols for /lib/64/libthread_db.so.1
#0  0x0000000000000000 in ?? ()
Setting up the environment for debugging gdb.
During symbol reading, Unknown C++ symbol name `...:p(3,95)'.
During symbol reading, misplaced N_LBRAC entry; discarding local symbols which 
have no enclosing block.
Breakpoint 1 at 0x1000eae74: file ../../gdb/utils.c, line 817.
During symbol reading, unknown symbol type 0xd8.
Breakpoint 2 at 0x100144ddc: file ../../gdb/cli/cli-cmds.c, line 189.
(top-gdb) bt
#0  0x0000000000000000 in ?? ()
(top-gdb) 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]