OpusBug()
is a function that calls CommonPointDebugger
--a UNIX program script--which runs a debugger to attach to your running process. While it is fairly limited because the UNIX environment is very different from other development environments, OpusBug()
provides the rudiments of printing a message and starting a debugger.
When you call OpusBug()
within the CommonPoint application system, it
system()
to call CommonPointDebugger
:, the program script. CommonPointDebugger
must be in your $PATH
.
sleep()
on the top of the stack; below sleep()
should be OpusBug()
and then the routine that called OpusBug()
. You should be able to debug from there.
OpusBug()
invokes CommonPointDebugger
via a system()
call, it carries a few restrictions:
CommonPointDebugger
script must terminate with an exit status of zero.
CommonPointDebugger
script must not be blocking. This means that anything that requires interaction, like a debugger, must be run in the background.
OpusBug()
:
void OpusBug(char *message); // Print the message, and call CommonPointDebugger
OpusBug()
passes two arguments, the process ID and the calling program name.