[gambit-list] Gambit and termite on an embedded system (Nintendo DS)?

Marc Feeley feeley at iro.umontreal.ca
Sat Oct 21 10:17:40 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 21-Oct-06, at 4:02 AM, Andrew Lentvorski wrote:

> Marc Feeley wrote:
>> You can either add your initialization code to ___main_* in lib/ 
>> os_base.c , or start Gambit from your own main (see the examples  
>> in tests/client.c and examples/pthread to see how to do this).
>
> I managed to get the system started, and I get a:
> "*** START OF DEBUGGING TRACES" line, but then, nothing.
>
> Running it under the no$gba emulator indicates a crash.
>
> Is there a flag or a define I can set to get Gambit to spew a lot  
> of debugging and tracing info?  It needs to be in one of the  
> compiled files as I don't have command line arguments.
>
> Thanks,
> -a

It sounds like the development environment is rather minimal on the  
Nintendo DS.  Is there no C debugger you can use to know in which C  
function the system crashed?

Also, add a printf in ___call in lib/setup.c to see if it is called  
and how many times.  The function ___call is used when Scheme code is  
being executed.  It is doesn't make it that far then you'll have to  
use printfs to narrow down the crash location.  Start at ___setup in  
lib/setup.c (for example before calls to ___setup_os, ___setup_mem,  
etc).

If the crash is in the Scheme code part of the runtime, something  
else you can do is add

#define ___DEBUG_HOST_CHANGES

at the top of include/gambit.h and recompile the whole system from  
scratch ("make mostlyclean; make").  This will add to the trace all  
control transfers between Scheme functions, which can tell you  
roughly in which Scheme procedure the program crashed.

Marc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFOiwE//V9Zc2T/v4RAnTNAJ0flWCgk+WC6qF9mbom2Usg/E3vRQCgkMxi
XAm6m3fy4ySk5lNfuwyiJBs=
=0s+I
-----END PGP SIGNATURE-----



More information about the Gambit-list mailing list