The following are the specific features available for debugging for OS/2 Warp (PowerPC Edition):
DBG_L_386
This is not defined in bsedos.h.
DBG_L_PPC
This is defined in bsedos.h.
a.
PID
#define DBG_L_PPC 2
DBG_N_Success
Note: A DBG_C_Connect does not need to be issued because DBG_C_Attach will perform the connection. Also, because the debugger did not start the task, it will not have a parent/child relationship as in a DBG_C_Connect.
DosDebug generates the following notifications:
PID
DBG_N_Success
Note: This is the only call that will cleanly turn off debugging and resume the specified task. DBG_C_Term will kill the task whether it was connected or attached.
a.
Note: For descendant debuggee tasks, DBG_N_NewProc will be sent instead. CMD
DosDebug informs the debugger that a notification has been returned, but not acknowledged. If you issue a Go/SStep/Stop and get the following synchronous notification, then you must issue a DBG_C_Continue before resuming execution.
rc = DosDebug() = 0;
puDB->Cmd = DBG_N_Error;
puDB->Value = ERROR_INVALID_FUNCTION;
The following code segments illustrate the use of various commands:
/*********************************************************************/
/* Connect and grab all pending DBG_N_ThreadCreate, DBG_N_ModuleInit */
/* and DBG_N_ModuleLoad notifications. Note, Stop returns */
/* DBG_N_Success when there are no more notifications. */
/*********************************************************************/
DBG_C_Connect
DBG_C_Stop
while ( puDB->Cmd != DBG_N_Success ) {
DBG_C_Continue w XCPT_CONTINUE_STOP
DBG_C_Stop
}
/**********************************************************************/
/* Go until certain notification occurs. This loop will also grab any */
/* pending notifications that are outstanding since DBG_C_Go won't */
/* execute if any notifications are pending. */
/**********************************************************************/
DBG_C_Go
while (debug_buffer->Cmd != Notification your looking for) {
DBG_C_Continue w XCPT_CONTINUE_STOP
DBG_C_GO
}
/*********************************************************************/
/* Clear all pending notifications and acknowledge each notification */
/*********************************************************************/
DBG_C_STOP
while (debug_buffer->Cmd != DBG_N_Success) {
DBG_C_Continue w XCPT_CONTINUE_STOP
DBG_C_STOP
}
a.
a.
PBuf->Cmd = DBG_C_NumToAddr; PBuf->Value = 1;b.
PBuf->Cmd = DBG_C_NumToAddr;
PBuf->Value = 2;
c.
PBuf->Cmd = DBG_C_NumToAddr;
PBuf->Value = 0;