library/src/blockclass/BP-BlockClass.cc
// Attaches to a pid, destroys the handle if not already destroyed
// and detaches if not already detached.
Attaches to a pid, destroys the handle if not already destroyed
and detaches if not already detached.
Attaches to a pid destroys the handle if not already destroyed and detaches if not already detached .
int Block::DbgStartPid(int pid)
{
	if (dbgHandle != NULL)
	{
		if (dbgHandle->attached > 0)
		{
			DebugDetach(dbgHandle);
		}
	}
	if (dbgHandle != NULL)
	{
		DestroyDebugHandle(dbgHandle);
		dbgHandle = NULL;
	}
	dbgHandle = DebugAttachToPid(pid);
	if (dbgHandle == NULL)
		return ERR_FAILURE;
	return ERR_SUCCESS;
}
int Block :: DbgStartPid ( int pid ) { if ( dbgHandle != NULL ) { if ( dbgHandle -> attached > 0 ) { DebugDetach ( dbgHandle ) ; } } if ( dbgHandle != NULL ) { DestroyDebugHandle ( dbgHandle ) ; dbgHandle = NULL ; } dbgHandle = DebugAttachToPid ( pid ) ; if ( dbgHandle == NULL ) return ERR_FAILURE ; return ERR_SUCCESS ; }
Attaches to a pid, destroys the handle if not already destroyed
and detaches if not already detached.
Attaches to a pid destroys the handle if not already destroyed and detaches if not already detached .
// detach if not detached // destroy if not destroyed // Now start pid // return indicating success