<a name="l3"></a>* You can enter the debugger with </span><a href="/Wb/Kernel/KDbg.HC.HTML#l649"><span class=cF4>Dbg</span></a><span class=cF0>() or </span><span class=cF2><CTRL-ALT-d></span><span class=cF0>. You might enter the
<a name="l4"></a>debugger through a fault. Enter </span><a href="/Wb/Kernel/KDbg.HC.HTML#l444"><span class=cF4>G</span></a><span class=cF0>() or </span><a href="/Wb/Kernel/KDbg.HC.HTML#l469"><span class=cF4>G2</span></a><span class=cF0>() to continue execution. Place a
<a name="l5"></a>call to </span><a href="/Wb/Kernel/KDbg.HC.HTML#l649"><span class=cF4>Dbg</span></a><span class=cF0>() in your code at fatal error points to enter the debugger. If you
<a name="l6"></a>see a stk dump, record the label+offset and unassemble, </span><a href="/Wb/Compiler/UAsm.HC.HTML#l653"><span class=cF4>U</span></a><span class=cF0>(). </span><a href="/Wb/Compiler/UAsm.HC.HTML#l653"><span class=cF4>U</span></a><span class=cF0>(</span><a href="/Wb/Kernel/KernelA.HH.HTML#l3377"><span class=cF4>_RIP</span></a><span class=cF0>);
<a name="l8"></a>* </span><a href="/Wb/Compiler/UAsm.HC.HTML#l653"><span class=cF4>U</span></a><span class=cF0>(&FunName+offset) to unassemble mem or </span><a href="/Wb/Adam/ADbg.HC.HTML#l254"><span class=cF4>Uf</span></a><span class=cF0>("FunName") to unassemble a
<a name="l11"></a>* While debugging, you specify addresses of assembly routines with just the
<a name="l12"></a>label, as in </span><span class=cF2>_MALLOC+0x20</span><span class=cF0>. You specify </span><a href="/Wb/Doc/HolyC.DD.HTML#l1"><span class=cF4>HolyC</span></a><span class=cF0> function names with </span><span class=cF2>&</span><span class=cF0> before
<a name="l13"></a>functions as in </span><span class=cF2>&Print+0x10</span><span class=cF0>.
<a name="l15"></a>* I use </span><a href="/Wb/Kernel/KernelB.HH.HTML#l209"><span class=cF4>progress1</span></a><span class=cF0>-</span><a href="/Wb/Kernel/KernelB.HH.HTML#l227"><span class=cF4>progress4</span></a><span class=cF0> for debugging because they show on the wallpaper.
<a name="l18"></a>* You can use </span><a href="/Wb/Kernel/Job.HC.HTML#l423"><span class=cF4>AdamLog</span></a><span class=cF0>() to send text to the </span><a href="/Wb/Doc/Glossary.DD.HTML#l171"><span class=cF4>Adam Task</span></a><span class=cF0> window. It works like </span><span class=cF4>
<a name="l19"></a></span><a href="/Wb/Kernel/StrPrint.HC.HTML#l890"><span class=cF4>Print</span></a><span class=cF0>(). I never use that. Instead, I use </span><a href="/Wb/Kernel/KDbg.HC.HTML#l217"><span class=cF4>RawPrint</span></a><span class=cF0>().
<a name="l21"></a>* </span><a href="/Wb/Kernel/KDbg.HC.HTML#l172"><span class=cF4>D</span></a><span class=cF0>(), </span><a href="/Wb/Adam/DolDoc/DocPutS.HC.HTML#l325"><span class=cF4>DocD</span></a><span class=cF0>(), </span><a href="/Wb/Kernel/KDbg.HC.HTML#l234"><span class=cF4>RawD</span></a><span class=cF0>() to do 16 column hex dump mem with numbering from zero.
<a name="l22"></a>With </span><a href="/Wb/Adam/DolDoc/DocPutS.HC.HTML#l325"><span class=cF4>DocD</span></a><span class=cF0> the values are updated continually and you can alter mem by editing.
<a name="l26"></a>* </span><a href="/Wb/Kernel/KDbg.HC.HTML#l209"><span class=cF4>Da</span></a><span class=cF0>() to do one column address dump (for stk, etc.) with symbolic addresses.
<a name="l28"></a>* </span><a href="/Wb/Kernel/KDbg.HC.HTML#l328"><span class=cF4>Dr</span></a><span class=cF0>() dumps regs. You can display and modify regs in the debugger with
<a name="l31"></a>* </span><a href="/Wb/Adam/ADbg.HC.HTML#l161"><span class=cF4>ClassRep</span></a><span class=cF0>() and the dynamic version </span><a href="/Wb/Adam/ADbg.HC.HTML#l183"><span class=cF4>ClassRepD</span></a><span class=cF0>() can be used to dump structures.
<a name="l36"></a>* Use </span><a href="/Wb/Kernel/KDbg.HC.HTML#l217"><span class=cF4>RawPrint</span></a><span class=cF0>() to print debug info bypassing the window framework. You pass
<a name="l38"></a>can use </span><a href="/Wb/Kernel/KMisc.HC.HTML#l290"><span class=cF4>Raw</span></a><span class=cF0>(</span><span class=cF2>TRUE</span><span class=cF0>) to make all output bypass the window framework. The </span><span class=cF2>WinMgr</span><span class=cF0>
<a name="l42"></a>* Use </span><a href="/Wb/Kernel/KMisc.HC.HTML#l280"><span class=cF4>SysDbg</span></a><span class=cF0>() to set a flag which you can read with </span><a href="/Wb/Kernel/KMisc.HC.HTML#l285"><span class=cF4>IsSysDbg</span></a><span class=cF0>() when you wish to
<a name="l48"></a> </span><a href="/Wb/Compiler/CMisc.HC.HTML#l63"><span class=cF4>Echo</span></a><span class=cF0>() turns on or off raw data going into the lexical analyzer.
<a name="l56"></a>* There is a heap check utility which can find leaks. Use </span><a href="/Wb/Adam/Opt/Utils/HeapLog.HC.HTML#l73"><span class=cF4>HeapLog</span></a><span class=cF0>(), </span><span class=cF4>
<a name="l57"></a></span><a href="/Wb/Adam/Opt/Utils/HeapLog.HC.HTML#l115"><span class=cF4>HeapLogAddrRep</span></a><span class=cF0>() and </span><a href="/Wb/Adam/Opt/Utils/HeapLog.HC.HTML#l146"><span class=cF4>HeapLogSizeRep</span></a><span class=cF0>(). It's a really simple program which
<a name="l58"></a>intercepts </span><a href="/Wb/Kernel/Mem/MAllocFree.HC.HTML#l387"><span class=cF4>MAlloc</span></a><span class=cF0>() and </span><a href="/Wb/Kernel/Mem/MAllocFree.HC.HTML#l383"><span class=cF4>Free</span></a><span class=cF0>(). You can customize the code to find other heap
<a name="l61"></a>* You can define hndlr functions for </span><span class=cF2><CTRL-ALT-letter></span><span class=cF0> keys with </span><a href="/Wb/Kernel/KeyDev.HC.HTML#l178"><span class=cF4>CtrlAltCBSet</span></a><span class=cF0>().
<a name="l63"></a>queues kbd msgs. You can do </span><a href="/Wb/Kernel/KMisc.HC.HTML#l290"><span class=cF4>Raw</span></a><span class=cF0>() output. </span><span class=cF2><CTRL-ALT-letter></span><span class=cF0> hndlrs take a
<a name="l66"></a>* If you recompile </span><span class=cF2>Kernel</span><span class=cF0> with </span><a href="/Wb/Adam/Opt/Boot/BootHDIns.HC.HTML#l18"><span class=cF4>BootHDIns</span></a><span class=cF0>(), you can set the </span><span class=cF4>MemInit</span><span class=cF0>, option to