void DebugFini( void ) { PointFini(); #if !( defined( __GUI__ ) && defined( __OS2__ ) ) ReleaseProgOvlay( TRUE ); // see dlgfile.c #endif VarDisplayFini(); FiniHook(); FiniCmd(); LogFini(); while( !PurgeInpStack() ) { ClearInpStack( INP_STOP_PURGE ); } LangSetFini(); SupportFini(); FiniTrap(); RecordFini(); FiniMachState(); FiniDbgInfo(); FiniScan(); FiniLook(); FiniDLLList(); FiniSource(); FiniCall(); PathFini(); DUIFini(); SymCompFini(); FiniMADInfo(); FiniTrace(); RestoreHandlers(); _Free( TrapParms ); FiniLiterals(); FiniLocalInfo(); }
void FiniTrap( void ) { disconnect_req in_mx; in_mx.req = REQ_DISCONNECT; TrapSimpAccess( sizeof( in_mx ), &in_mx, 0, NULL ); RestoreHandlers(); KillTrap(); GrabHandlers(); #if !defined( BUILD_RFX ) FiniSuppServices(); #endif #ifdef ENABLE_TRAP_LOGGING CloseTrapTraceFile(); #endif }
void KillDebugger( int rc ) { RestoreHandlers(); Cleanup(); TinyTerminateProcess( rc ); }
void InitTrap( char *trap_file ) { mx_entry in[1]; mx_entry out[2]; connect_req in_mx; connect_ret out_mx; char *error; trap_version ver; char buff[ TXT_LEN ]; #ifdef ENABLE_TRAP_LOGGING if( TrpDebugFile ) OpenTrapTraceFile( TrpDebugFile, TrpDebugFileFlush ); #endif /* Don't use TxtBuff except for error -- it may have a Finger message in it */ #if !defined( BUILD_RFX ) TrapSetFailCallBack( TrapFailed ); #endif InitTrapError = FALSE; RestoreHandlers(); ver.remote = FALSE; #if !defined( BUILD_RFX ) if( stricmp( trap_file, "dumb" ) == 0 ) { error = LoadDumbTrap( &ver ); } else { #endif error = LoadTrap( trap_file, buff, &ver ); #if !defined( BUILD_RFX ) } #endif GrabHandlers(); if( error != NULL ) { strcpy( buff, error ); InitTrapError = TRUE; StartupErr( buff ); } in_mx.req = REQ_CONNECT; in_mx.ver.major = TRAP_MAJOR_VERSION; in_mx.ver.minor = TRAP_MINOR_VERSION; in_mx.ver.remote = FALSE; in[0].ptr = &in_mx; in[0].len = sizeof( in_mx ); out[0].ptr = &out_mx; out[0].len = sizeof( out_mx ); buff[0] = '\0'; out[1].ptr = buff; out[1].len = MAX_ERR_MSG_SIZE; TrapAccess( 1, in, 2, out ); MaxPacketLen = out_mx.max_msg_size; if( buff[0] != '\0' ) { KillTrap(); InitTrapError = TRUE; StartupErr( buff ); } #if !defined( BUILD_RFX ) if( !InitTrapError ) { InitSuppServices(); } #endif if( ver.remote ) { _SwitchOn( SW_REMOTE_LINK ); } else { _SwitchOff( SW_REMOTE_LINK ); } }
void KillDebugger( void ) { RestoreHandlers(); TinyTerminateProcess( 0 ); }
void KillDebugger( int rc ) { RestoreHandlers(); Cleanup(); _exit( rc ); }