Hi,

I've been using gdb on UnixWare 1 and 2 for a while, but
when I began using it on UnixWare 7, bad things started
happening.  I configured it using "./configure", and I did
configure/re-compile it on UnixWare 7 just to make sure
there weren't any incorrect dependencies on UnixWare 1 or
2...  Basically it doesn't like the format of the core
file.  I've attached a shell script, as well as the output,
which reproduces the problem in a simple way.  Any help you
can give me would be greatly appreciated.  Thanks.

        -Russ

P.S. I can send the executable file and core file if that
would help.

-- 
Russell B. Jorgensen, Lucent Technologies, Denver, CO
email: [EMAIL PROTECTED]
phone: 303-538-5012
fax:   303-538-3564
#
#       demonstrate the problem with gdb on UnixWare 7
#

#       make a temporary directory
mkdir /tmp/gdb$$

#       go create the bug.c file
cd /tmp/gdb$$
cat - >bug.c <<EOF
#include <stdio.h>

int main (
        int argc,
        char **argv
){
        char *ptr = NULL;

        /* should core dump */
        *ptr = 'h';
}
EOF

#       compile bug.c
echo "==== cc -g -v -Xa bug.c -o bug"
cc -g -v -Xa bug.c -o bug

#       show what type of file bug is
echo "==== file bug"
file bug

#       run bug
echo "==== running bug"
bug

#       show what type of file the core is
echo "==== file core*"
file core*

#       run gdb
echo "==== running gdb"
echo quit | $HOME/gdb.uw7 bug core*

#       all done
cd
rm -rf /tmp/gdb$$
==== cc -g -v -Xa bug.c -o bug
==== file bug
bug:            ELF 32-bit LSB executable 80386 Version 1
==== running bug
gdb_bug: line 34: 5133: Memory fault(coredump)
==== file core*
core.5133:      ELF 32-bit LSB core file 80386 Version 1
        Arguments = 'bug '
==== running gdb
GNU gdb 4.18
Copyright 1998 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 "i586-UnixWare7.1.1-sysv5"...Couldn't fetch registers from 
core file: File in wrong format

Core was generated by `bug'.
Reading symbols from /usr/lib/libc.so.1...done.
Couldn't fetch registers from core file: Invalid operation
#0  0x0 in ?? ()
(gdb) 

Reply via email to