Page 1 of 1
Debugging callbacks
Posted: Sun Aug 11, 2013 2:17 am
by djcouchycouch
Hi,
If ever I get one of SGDK's error callbacks called (ie "illegal instruction!"), what kind of information is available that can I use to debug the problem?
Thanks!
DJCC
Posted: Sun Aug 11, 2013 10:24 am
by TmEE co.(TM)
You can get the address of the offending instruction from the stack.
Posted: Sun Aug 11, 2013 10:32 am
by HardWareMan
TmEE co.(TM) wrote:You can get the address of the offending instruction from the stack.
You should not confuse the SDK callback and an exception call by the processor. If you are using exception calls (vectors) all that you can get about exception are described in the UM. If you are use callback of SDK, it all depends on the implementation of the SDK.
Posted: Sun Aug 11, 2013 7:25 pm
by Stef
The current SGDK version just display the occurring exception, the next version will display registers and stack state to help in debugging (you can download the updated files from the SVN repository
http://sgdk.googlecode.com/svn/trunk/ ).
Later i plan to even add custom user callback but for the moment you can modify the SGDK library callback to do what you want with...