Changeset 1640

Show
Ignore:
Timestamp:
06/29/08 15:07:36 (4 months ago)
Author:
common
Message:

libemu

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libemu/trunk/src/environment/win32/env_w32_dll_export_kernel32_hooks.c

    r1631 r1640  
    346346        POP_DWORD(c, &eip_save); 
    347347 
     348        emu_profile_function_add(env->profile, "ExitProcess"); 
    348349/* 
    349350VOID WINAPI ExitProcess( 
     
    354355        uint32_t exitcode; 
    355356        POP_DWORD(c, &exitcode); 
    356  
     357        emu_profile_argument_add_int(env->profile, "UINT", "uExitCode", exitcode); 
     358 
     359        uint32_t returnvalue; 
     360        if ( hook->hook.win->userhook != NULL ) 
     361        { 
     362                returnvalue = hook->hook.win->userhook(env, hook,  
     363                                                                                          exitcode); 
     364        }else 
     365        { 
     366                returnvalue     = 0; 
     367        } 
     368 
     369        emu_profile_function_returnvalue_int_set(env->profile, "void", returnvalue); 
    357370 
    358371        emu_cpu_eip_set(c, eip_save); 
     
    371384        POP_DWORD(c, &eip_save); 
    372385 
     386        emu_profile_function_add(env->profile, "ExitThread"); 
    373387/* 
    374388VOID ExitThread( 
     
    380394        POP_DWORD(c, &exitcode); 
    381395 
    382  
     396        emu_profile_argument_add_int(env->profile, "DWORD", "dwExitCode", exitcode); 
     397 
     398        uint32_t returnvalue; 
     399        if ( hook->hook.win->userhook != NULL ) 
     400        { 
     401                returnvalue = hook->hook.win->userhook(env, hook,  
     402                                                                                          exitcode); 
     403        }else 
     404        { 
     405                returnvalue     = 0; 
     406        } 
     407 
     408 
     409        emu_profile_function_returnvalue_int_set(env->profile, "void", returnvalue); 
    383410        emu_cpu_eip_set(c, eip_save); 
    384411        return 0; 
     
    877904        POP_DWORD(c, &eip_save); 
    878905 
     906        emu_profile_function_add(env->profile, "SetUnhandledExceptionFilter"); 
    879907/*LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter( 
    880908  LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter 
     
    883911        uint32_t lpfilter; 
    884912        POP_DWORD(c, &lpfilter); 
     913        emu_profile_argument_add_ptr(env->profile, "LPTOP_LEVEL_EXCEPTION_FILTER", "lpTopLevelExceptionFilter", lpfilter); 
     914        emu_profile_argument_add_none(env->profile); 
     915 
    885916 
    886917        logDebug(env->emu, "Exception filter %08x\n", lpfilter); 
    887918 
    888919        emu_cpu_reg32_set(c, eax, 0x7C81CDDA); 
     920 
     921        emu_profile_function_returnvalue_ptr_set(env->profile, "LPTOP_LEVEL_EXCEPTION_FILTER", 0x7C81CDDA); 
     922        emu_profile_argument_add_none(env->profile); 
    889923 
    890924        emu_cpu_eip_set(c, eip_save);