Sparc - How to find error location for illegal instruction trap.

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Apr 22 11:36:19 UTC 2014


On 2014-04-22 12:59, Thomas Kim wrote:
> Dear Sir,
>
> I have some problem regarding illegal instruction on Sparc.
>
> I checked that first parameter value of bsp_spurious_handler is 258.
> It means illegal instruction trap.
>
> But, I can not find error location regarding this.
>
> Please could you let me know how to do ?

You can use something like this:

Breakpoint 2, _Terminate (the_source=RTEMS_FATAL_SOURCE_EXCEPTION, 
is_internal=false, the_error=33872968) at 
/home/sh/rtems-4.11/c/src/../../cpukit/score/src/interr.c:39
39        _ISR_Disable_without_giant( level );
(gdb) p *(CPU_Exception_frame *)the_error
$4 = {
   trap = 263,
   isf = 0x2053e40
}
(gdb) p *((CPU_Exception_frame *)the_error)->isf
$5 = {
   Stack_frame = {
     l0 = 4194496,
     l1 = 33571640,
     l2 = 33571644,
     l3 = 0,
     l4 = 4,
     l5 = 4,
     l6 = 1,
     l7 = 0,
     i0 = 33860452,
     i1 = 33860160,
     i2 = 0,
     i3 = 0,
     i4 = 0,
     i5 = 257,
     i6_fp = 33898352,
     i7 = 33798476,
     structure_return_address = 0x2c,
     saved_arg0 = 3,
     saved_arg1 = 33875064,
     saved_arg2 = 33898204,
     saved_arg3 = 199,
     saved_arg4 = 33760496,
     saved_arg5 = 33760500,
     pad0 = 2
   },
   psr = 4194503,
   pc = 33559692,
   npc = 33559696,
   g1 = 1,
   g2 = 2,
   g3 = 35,
   g4 = 33860080,
   g5 = 0,
   reserved_for_alignment = 0,
   g7 = 0,
   i0 = 35,
   i1 = 33876472,
   i2 = 0,
   i3 = 257,
   i4 = 0,
   i5 = 33827516,
   i6_fp = 33898224,
   i7 = 33559672,
   y = 335544320,
   tpc = 33559688
}

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list