Debugging callbacks

SGDK only sub forum

Moderator: Stef

Post Reply
djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Debugging callbacks

Post 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
TmEE co.(TM)
Very interested
Posts: 2452
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) »

You can get the address of the offending instruction from the stack.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
HardWareMan
Very interested
Posts: 753
Joined: Sat Dec 15, 2007 7:49 am

Post 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.
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post 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...
Post Reply