On Thu, Nov 19, 2009 at 9:07 PM, Nick Couchman Nick.Couchman@seakr.com wrote:
This is unaligned access exception. With GDB you could check if some address matches the PC value.
(gdb) l *0x00000000ffd10de4 0xffd10de4 is in fetch (../include/openbios/stack.h:34). 29 typedef ucell phandle_t; 30 31 32 33 34 static inline void PUSH(ucell value) { 35 dstack[++dstackcnt] = (value); 36 } 37 static inline void PUSH_xt( xt_t xt ) { PUSH( (ucell)xt ); } 38 static inline void PUSH_ih( ihandle_t ih ) { PUSH( (ucell)ih ); }
So, something about the PUSH function that it doesn't like??
More likely the address given to fetch was not aligned: static void fetch(void) { const ucell *aaddr = (ucell *)cell2pointer(POP()); PUSH(read_ucell(aaddr)); }
Here QEMU can help, enable DEBUG_PCALL in target-sparc/op_helper.c and recompile. Then run QEMU with -d int and /tmp/qemu.log will contain the register dump at the time of the exception.