void InitDebug( struct TDebug *obj, const char *Program, const char *Param, const char *StartDir ) { obj->FProgram = malloc( strlen( Program ) + 1 ); strcpy( obj->FProgram, Program ); obj->FParam = malloc( strlen( Param ) + 1 ); strcpy( obj->FParam, Param ); obj->FStartDir = malloc( strlen( StartDir ) + 1 ); strcpy( obj->FStartDir, StartDir ); obj->UserWait = RdosCreateWait(); obj->UserSignal = RdosCreateSignal(); RdosAddWaitForSignal( obj->UserWait, obj->UserSignal, obj ); obj->FSection = RdosCreateSection(); obj->ThreadList = 0; obj->ModuleList = 0; obj->CurrentThread = 0; obj->BreakList = 0; obj->FThreadChanged = FALSE; obj->FModuleChanged = FALSE; RdosCreateThread(DebugThread, "Debug device", obj, 0x4000); }
void InitDebug( struct TDebug *obj, const char *Program, const char *Param, const char *StartDir ) { obj->FProgram = malloc( strlen( Program ) + 1 ); strcpy( obj->FProgram, Program ); obj->FParam = malloc( strlen( Param ) + 1 ); strcpy( obj->FParam, Param ); obj->FStartDir = malloc( strlen( StartDir ) + 1 ); strcpy( obj->FStartDir, StartDir ); obj->UserWait = RdosCreateWait(); obj->UserSignal = RdosCreateSignal(); RdosAddWaitForSignal( obj->UserWait, obj->UserSignal, obj ); obj->FSection = RdosCreateSection(); obj->ThreadList = 0; obj->ModuleList = 0; obj->CurrentThread = 0; obj->NewThread = 0; obj->BreakList = 0; obj->WatchList = 0; obj->FThreadChanged = FALSE; obj->FModuleChanged = FALSE; obj->FHandle = 0; obj->FMemoryModel = DEBUG_MEMORY_MODEL_FLAT; obj->FConfigChange = FALSE; obj->FAsyncBreak = FALSE; obj->FAsyncSel = 0; obj->FAsyncOffset = 0; obj->FWaitLoad = TRUE; RdosCreateThread( DebugThread, "Debug device", obj, 0x4000 ); }