using the humec tools 20 th march 2006 robert pointon
TRANSCRIPT
Using the humec Tools
20th March 2006
Robert Pointon
Directory Structure
/hume/humec/- ‘humec’ driver program. <-- use this!
/ham2c/- macro expansion of ham to c.- ‘ham2c’ program.
/rts/- minimal runtime system.- ‘rts.ar’ library.
/dbham/- debugging.- ‘hamdb.Main’ java program <-- use this!- ‘dbham’ program (‘DBham’ java equivalent)
Compiling to C
Humec pump (Also: humec pump.hume, pump.ham, pump.c …)
- produces a ‘pump’ executable.
- Other options:- ‘-lotsapace’ - overides space/heap comping from
phamc.- ‘-g’ - enable debug support in executable.- ‘-dbham’ - dumps the intermediate shuffled ham
code.
Problems
• Heap/StackOverflow Exception– Recompile with ‘-lotsaspace’– Fix ham file– Edit C file (#define STACK/HEAP SIZE)
• WireOverflow Exception– Fix ham file.
• InternalError Exception– Fix your Hume!– Email Robert…
Problems
• “<partial write>”/“<data show overflow>”– Edit C file
char buff[51];int len = textValue(buff, 50, ptr);
– Increase the ‘51’ and ‘50’…
• Soft Stack/Heap Overflow– Just a warning the program will run ok:
phamc got the bounds wrong... Can fix ham file if you wish.
Debugging
• Start the debugger:java hamdb.Main 5406
– Only need to do this once, the debugger can debug multiple programs.
• Compile:humec -g pump
• Start your program:pump -g5406
– The debugger will display a window.