View Single Post
Old 25 September 2015, 11:06   #43
bernd roesch
Registered User
Join Date: Apr 2012
Location: germany
Posts: 130
Originally Posted by FrodeSolheim View Post
@jbl007 Thank you, it worked fine (= it crashed )

You will not be able to get a stack trace in the debugger, because the crashes almost always happens in JIT-generated code, which is just one large 8 MB (typically) segment with generated code (no regular C functions here). In this particular crash, it was even worse, because when the stack is corrupted, more stupid things starts to happen, and the crash is often unrelated to the actual stack corruption.
great that you find. the 68k output with winuaeenforcer is usefull in JIT too, to find the block of 68k code that cause crash. remember what i write here before, that the 1. loop is always execute with interpreter. also should know, that the JIT at the end of every block update 68k PC

So if you get a error in winuaeenforcer(or you look in gdb what PC value is, when uae crash) this show the last block that is exectute from JIT . the real error is then later in the code. For example

68k code contain this

$1000 addq #1,d0
$1002 dbf d1,$980
$1006 wrong instruction
$1020 bne $1010

Then the 1. JIT block range from $980 upto $1006-1
second JIT block range from $1006 upto $1010-1
third JIT block range from $1010 upto $1020-1

the reason wy JIT code generation always do 1 loop with interpreter is, because it can not know that $1010 should be start of a block. JIT only notice because of backjump at $1020 (bne $1010) that $1010 need start of block. so there is always 1 loop need that do with interpreter

now when the JIT code reach $1006 it crashes and maybe winuaeenforcer do a output, because of wrong address.

But because the PC is not exact(because code is before execute with interpreter), you need look what is done before in this block or look at the next block. so you need only look at 68k code of JIT block1 and JIT block2.

If know this, then winuaeenforcer is very usefull and help find problems faster

Last edited by bernd roesch; 25 September 2015 at 11:17.
bernd roesch is offline  
Page generated in 0.04135 seconds with 11 queries