Ejemplo n.º 1
0
static void DebugThread( void *Param )
{
    int CurrModuleHandle;
    int WaitHandle;
    int thread;
    struct TDebug *obj = (struct TDebug *)Param;

    obj->FInstalled = TRUE;

    CurrModuleHandle = RdosGetModuleHandle();
    SelfKey = RdosGetModuleFocusKey( CurrModuleHandle );    
    if ( SelfKey != RdosGetFocus() )
        SelfKey = 0;
        
    RdosWaitMilli( 250 );

    obj->FHandle = RdosSpawnDebug( obj->FProgram, obj->FParam, obj->FStartDir, 0, 0, &thread);
        
    RdosWaitMilli( 250 );

    if( obj->FHandle ) {
        WaitHandle = RdosCreateWait();
        RdosAddWaitForDebugEvent( WaitHandle, obj->FHandle, obj );
        
        while( obj->FInstalled )
            if( RdosWaitForever( WaitHandle ) )
                SignalDebugData( obj );

        RdosCloseWait( WaitHandle );
    } else
        obj->FInstalled = FALSE;
}
Ejemplo n.º 2
0
bool DebugScreen( void )
{
    int handle;
    
    if( my_key == 0) {
        handle = RdosGetModuleHandle();
        my_key = RdosGetModuleFocusKey( handle );
    }
    
    if( my_key )
        RdosSetFocus( my_key );
        
    return( FALSE );
}
Ejemplo n.º 3
0
static void InitProcessDebugModule( struct TDebugModule *obj, struct TCreateProcessEvent *event )
{
    obj->FileHandle = event->FileHandle;
    obj->Handle = event->Handle;
    obj->ImageBase = event->ImageBase;
    obj->ImageSize = event->ImageSize;
    obj->ObjectRva = event->ObjectRva;
    obj->CodeSel = 0;
    obj->DataSel = 0;

    obj->FNew = FALSE;

    if ( SelfKey )
        DebugKey = RdosGetModuleFocusKey( event->Handle );

    ReadModuleName( obj );
}
Ejemplo n.º 4
0
bool UserScreen( void )
{
    int handle;
    image_entry *img;
        
    if( debug_key == 0 ) {
        img = ImagePrimary();
        if( img ) {
            handle = img->system_handle;
            debug_key = RdosGetModuleFocusKey( handle );
        }        
    }

    if( debug_key )
        RdosSetFocus( debug_key );

    return( FALSE );
}