Priest of the Order of the Butterfly
Posts: 538 from 2003/2/25
From: France
For debuging purpose, you can link with -ldebug:
Code:
gcc -noixemul -o test test.c -ldebug
Do not forgot to include the following proto:
Code:
#include <clib/debug_protos.h>
And then, in your code:
Code:
kprintf("Lock handle %pn', lock);
This will output some stuff in the debug log. Do not forget the trailing '\n' that triggers the output in the debug log. If not present, nothing will show up in the debug log until something send this.
You can also add a define like this
Code:
#ifdef DEBUG
#define D(x) x
#else
#define D(x)
#endif
And use D(kprintf("My conditional debug\n"));
Just #define DEBUG if you want the conditional debug.
About Snoopium:
It patches some DOS and Exec functions to track some system calls like Lock, Open, OpenLibrary and a bunch of others.
All processes that use the patched function will be tracked down in Snoopium. That's why you've seen this muidebug entry poping. There is a filter string gagdet at the bottom that you can make good use of. Insert #?yourprocessname#? here and every line that matches the pattern will show up in the output list.
Happy debugging.
[ Edited by Tcheko 31.12.2015 - 10:09 ]