Something seems wrong here :
$ dbx privlist
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.6' in your .dbxrc
Reading privlist
Reading ld.so.1
Reading libc.so.1
(dbx) help file
file (command)
file # Print the name of the current file
file <filename> # Change the current file
(dbx) file
dbx: No current source file
(dbx) file privlist.c
(dbx) file
dbx: No current source file
(dbx) quit
$
$ ls -lap privlist.c
-rw-r--r-- 1 dclarke dev 2346 Dec 31 20:47 privlist.c
$ ./compile.sh
cc: Sun C 5.9 SunOS_sparc Patch 124867-16 2010/08/11
### Note: NLSPATH =
/opt/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
### command line files and options (expanded):
### -c -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
-erroff=%all -g -mc -V -Xc -m64 -features=no%typeof -xcode=pic32
-xdebugformat=dwarf -xlibmieee -xmemalign=8s -xregs=no%appl -xs -xstrconst
-xtime -xunroll=1 privlist.c -o privlist.o
/opt/SUNWspro/prod/bin/acomp -dg -xldscope=global -i privlist.c -y-fbe
-y/opt/SUNWspro/prod/bin/fbe -y-xcode=pic32 -y-xarch=v9 -y-xmemalign=8s -y-g
-y-o -yprivlist.o -y-verbose -y-xthreadvar=dynamic -y-comdat
-xdbggen=no%stabs+dwarf2+usedonly -e rroff=%all -strconst -V -D_TS_ERRNO
-D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -xdbggen=incl -y-s -2K -m64
-fparam_ir -Qy -D__SunOS_5_10 -D__SUNPRO_C=0x590 -D__SVR4 -D__sun -D__SunOS
-D__unix -D__sparcv9 -D__sparc -D__BUILTIN_VA_ARG_INCR -D__C99FEATURES__ -Xc
-D__PRAGMA_REDEFINE_EXTNAME -xc99=%all,no%lib -D__FLT_EVAL_METHOD__=0
-features=no%typeof -I/opt/SUNWspro/prod/include/cc
"-g/opt/SUNWspro/prod/bin/cc -erroff -xstrconst -xildoff -m64 -xmemalign=8s
-xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none
-Qy -V -xbuiltin=%none -xdebugformat=dwarf -xtime -xunroll=1 -D_TS_ERRNO
-D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -c -o privlist.o " -fsimple=0
-D__SUN_PREFETCH -destination_ir=yabe
acomp: Sun C 5.9 SunOS_sparc Patch 124867-16 2010/08/11
"privlist.c", line 49: assignment type mismatch:
union {double _d, array[2] of unsigned int _l} "=" long
"privlist.c", line 50: invalid cast expression
"privlist.c", line 90: invalid cast expression
"privlist.c", line 91: invalid cast expression
"privlist.c", line 91: operands have incompatible types:
union {double _d, array[2] of unsigned int _l} "==" union {double
_d, array[2] of unsigned int _l}
"privlist.c", line 92: invalid cast expression
"privlist.c", line 93: invalid cast expression
"privlist.c", line 93: operands have incompatible types:
union {double _d, array[2] of unsigned int _l} "==" union {double
_d, array[2] of unsigned int _l}
cc: acomp failed for privlist.c
cc: Sun C 5.9 SunOS_sparc Patch 124867-16 2010/08/11
### Note: NLSPATH =
/opt/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
### command line files and options (expanded):
### -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -erroff=%all
-g -mc -V -Xc -m64 -features=no%typeof -xcode=pic32 -xdebugformat=dwarf
-xlibmieee -xmemalign=8s -xregs=no%appl -xs -xstrconst -xtime -xunroll=1
privlist.o -o privlist
### Note: LD_LIBRARY_PATH = <null>
### Note: LD_LIBRARY_PATH_64 = <null>
### Note: LD_RUN_PATH = <null>
/usr/ccs/bin/ld /opt/SUNWspro/prod/lib/v9/crti.o
/opt/SUNWspro/prod/lib/v9/crt1.o /opt/SUNWspro/prod/lib/v9/values-xi.o -o
privlist -V privlist.o -Y
"P,/opt/SUNWspro/prod/lib/v9:/usr/ccs/lib/sparcv9:/lib/sparcv9:/usr/lib/sparcv9"
-Qy -lc /opt/SUNWspro/prod/lib/v9/crtn.o
ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.1507
linker real 0.0 user 0.0 sys 0.0
/usr/ccs/bin/mcs -c privlist
mcs real 0.0 user 0.0 sys 0.0
-rwxr-xr-x 1 dclarke dev 11544 Dec 31 21:28 privlist
$
$ file privlist
privlist: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not
stripped
$ ldd privlist
libc.so.1 => /lib/64/libc.so.1
libm.so.2 => /lib/64/libm.so.2
/platform/SUNW,Sun-Fire-V490/lib/sparcv9/libc_psr.so.1
$
$ ./privlist
Segmentation Fault(coredump)
$
sure would be nice to use dbx here
$ dbx privlist core
Reading privlist
core file header read successfully
Reading ld.so.1
Reading libc.so.1
program terminated by signal SEGV (no mapping at the fault address)
0xffffffff7ef4c550: atol+0x0008: ldub [%o0], %g4
(dbx)
(dbx) where -h -l -v
=>[1] libc.so.1:atol(0x0, 0x0, 0x100000cf8, 0xffffffff7f14bf04,
0xffffffff7f100200, 0x4), at 0xffffffff7ef4c550
[2] privlist:main(0x1, 0xffffffff7ffffa68, 0xffffffff7ffffa78,
0xffffffff7ef4c920, 0xffffffff7f2000c0, 0xffffffff7f100200), at 0x100000cf8
(dbx) quit
Since I can't single-step into this as I can not reference the source its a
tad silly. Any thoughts ?
Dennis
--
--
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x1D936C72FA35B44B
+-------------------------+-----------------------------------+
| Dennis Clarke | Solaris and Linux and Open Source |
| [email protected] | Respect for open standards. |
+-------------------------+-----------------------------------+
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code