This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Illegal instruction on sparc32-linux
On Fri, Apr 19, David S. Miller wrote:
> From: Thorsten Kukuk <kukuk@suse.de>
> Date: Fri, 19 Apr 2002 11:47:22 +0200
>
> On Thu, Apr 18, David S. Miller wrote:
>
> > Can you put the program under GDB so we can see what the instruction
> > is that it is trapping on?
>
> I tried it. But when I compile it with -g, I cannot reproduce it from
> the shell or from gdb. But if I call "make", it fails again.
>
> It has to be dropping a core file somewhere, check that out
> with gdb.
Ok, here are the results:
Core was generated by `troff -U -ms -mwww -Tps'.
Program terminated with signal 4, Illegal instruction.
Couldn't read input and local registers from core file
Reading symbols from /usr/lib/libstdc++.so.4...done.
Loaded symbols for /usr/lib/libstdc++.so.4
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Couldn't read input and local registers from core file
#0 0x00042ddc in diversion::need(vunits) ()
(gdb) x/i $pc
0x42ddc <_ZN9diversion4needE6vunits+28>: call %o1
(gdb) disass
Dump of assembler code for function _ZN9diversion4needE6vunits:
0x42dc0 <_ZN9diversion4needE6vunits>: save %sp, -112, %sp
0x42dc4 <_ZN9diversion4needE6vunits+4>: add %fp, -12, %l0
0x42dc8 <_ZN9diversion4needE6vunits+8>: mov %i0, %o0
0x42dcc <_ZN9diversion4needE6vunits+12>: ld [ %i0 ], %o2
0x42dd0 <_ZN9diversion4needE6vunits+16>: st %l0, [ %sp + 0x40 ]
0x42dd4 <_ZN9diversion4needE6vunits+20>: ld [ %o2 + 0x18 ], %o1
0x42dd8 <_ZN9diversion4needE6vunits+24>: ld [ %i1 ], %i1
0x42ddc <_ZN9diversion4needE6vunits+28>: call %o1
0x42de0 <_ZN9diversion4needE6vunits+32>: nop
0x42de4 <_ZN9diversion4needE6vunits+36>: unimp 0x4
0x42de8 <_ZN9diversion4needE6vunits+40>: mov %i0, %o0
0x42dec <_ZN9diversion4needE6vunits+44>: mov %l0, %o1
0x42df0 <_ZN9diversion4needE6vunits+48>: ld [ %fp + -12 ], %l1
0x42df4 <_ZN9diversion4needE6vunits+52>: mov 1, %o3
0x42df8 <_ZN9diversion4needE6vunits+56>: cmp %l1, %i1
This is with binutils-2.12.90.0.4-3 (based on cvs from 8. April 2002),
gcc-3.1-20020415 and current glibc 2.2 branch.
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE Linux AG Deutschherrenstr. 15-19 D-90429 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B