Ignore:
Timestamp:
Feb 14, 2002, 11:24:29 AM (24 years ago)
Author:
sandervl
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/dbgwrap.h

    r7862 r7902  
    353353
    354354
     355//level 1 logging without function definitions
     356
     357#define NODEF_DEBUGWRAP0(a) \
     358DWORD WIN32API a();  \
     359DWORD WIN32API Dbg##a()             \
     360{                                          \
     361    DWORD ret;                             \
     362    dprintf((DBGWRAP_MODULE": %s", #a));         \
     363    dbg_ThreadPushCall(#a); \
     364    ret = (DWORD)a();         \
     365    dbg_ThreadPopCall(); \
     366    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     367    return ret;                            \
     368}
     369
     370#define NODEF_DEBUGWRAP0_NORET(a) \
     371void WIN32API a();  \
     372void WIN32API Dbg##a()             \
     373{                                          \
     374    DWORD ret;                             \
     375    dprintf((DBGWRAP_MODULE": %s", #a));         \
     376    dbg_ThreadPushCall(#a); \
     377    a();         \
     378    dbg_ThreadPopCall(); \
     379}
     380
     381#define NODEF_DEBUGWRAP4(a) \
     382DWORD WIN32API a(DWORD arg1);             \
     383DWORD WIN32API Dbg##a(DWORD arg1)             \
     384{                                          \
     385    DWORD ret;                             \
     386    dprintf((DBGWRAP_MODULE": %s %x", #a, arg1));         \
     387    dbg_ThreadPushCall(#a); \
     388    ret = ((DBG_WINPROC4)a)(arg1);         \
     389    dbg_ThreadPopCall(); \
     390    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     391    return ret;                            \
     392}
     393
     394#define NODEF_DEBUGWRAP4_NORET(a) \
     395void WIN32API a(DWORD arg1);             \
     396void WIN32API Dbg##a(DWORD arg1)             \
     397{                                          \
     398    dprintf((DBGWRAP_MODULE": %s %x", #a, arg1));         \
     399    dbg_ThreadPushCall(#a); \
     400    ((DBG_WINPROC4_NORET)a)(arg1);         \
     401    dbg_ThreadPopCall(); \
     402}
     403
     404#define NODEF_DEBUGWRAP8(a) \
     405DWORD WIN32API a(DWORD arg1, DWORD arg2); \
     406DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2) \
     407{                                          \
     408    DWORD ret;                             \
     409    dprintf((DBGWRAP_MODULE": %s %x %x", #a, arg1, arg2));         \
     410    dbg_ThreadPushCall(#a); \
     411    ret = ((DBG_WINPROC8)a)(arg1, arg2);         \
     412    dbg_ThreadPopCall(); \
     413    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     414    return ret;                            \
     415}
     416
     417#define NODEF_DEBUGWRAP12(a) \
     418DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3); \
     419DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3) \
     420{                                          \
     421    DWORD ret;                             \
     422    dprintf((DBGWRAP_MODULE": %s %x %x %x", #a, arg1, arg2, arg3));         \
     423    dbg_ThreadPushCall(#a); \
     424    ret = ((DBG_WINPROC12)a)(arg1, arg2, arg3);         \
     425    dbg_ThreadPopCall(); \
     426    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     427    return ret;                            \
     428}
     429
     430#define NODEF_DEBUGWRAP16(a) \
     431DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4); \
     432DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4) \
     433{                                          \
     434    DWORD ret;                             \
     435    dprintf((DBGWRAP_MODULE": %s %x %x %x %x", #a, arg1, arg2, arg3, arg4));         \
     436    dbg_ThreadPushCall(#a); \
     437    ret = ((DBG_WINPROC16)a)(arg1, arg2, arg3, arg4);         \
     438    dbg_ThreadPopCall(); \
     439    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     440    return ret;                            \
     441}
     442
     443#define NODEF_DEBUGWRAP20(a) \
     444DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5); \
     445DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5) \
     446{                                          \
     447    DWORD ret;                             \
     448    dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5));         \
     449    dbg_ThreadPushCall(#a); \
     450    ret = ((DBG_WINPROC20)a)(arg1, arg2, arg3, arg4, arg5);         \
     451    dbg_ThreadPopCall(); \
     452    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     453    return ret;                            \
     454}
     455
     456#define NODEF_DEBUGWRAP24(a) \
     457DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6); \
     458DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6) \
     459{                                          \
     460    DWORD ret;                             \
     461    dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg6));         \
     462    dbg_ThreadPushCall(#a); \
     463    ret = ((DBG_WINPROC24)a)(arg1, arg2, arg3, arg4, arg5, arg6);         \
     464    dbg_ThreadPopCall(); \
     465    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     466    return ret;                            \
     467}
     468
     469#define NODEF_DEBUGWRAP28(a) \
     470DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7); \
     471DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7) \
     472{                                          \
     473    DWORD ret;                             \
     474    dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg7));         \
     475    dbg_ThreadPushCall(#a); \
     476    ret = ((DBG_WINPROC28)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7);         \
     477    dbg_ThreadPopCall(); \
     478    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     479    return ret;                            \
     480}
     481
     482#define NODEF_DEBUGWRAP32(a) \
     483DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8); \
     484DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8) \
     485{                                          \
     486    DWORD ret;                             \
     487    dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg7, arg8));         \
     488    dbg_ThreadPushCall(#a); \
     489    ret = ((DBG_WINPROC32)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);         \
     490    dbg_ThreadPopCall(); \
     491    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     492    return ret;                            \
     493}
     494
     495#define NODEF_DEBUGWRAP36(a) \
     496DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9); \
     497DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9) \
     498{                                          \
     499    DWORD ret;                             \
     500    dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg7, arg8, arg9));         \
     501    dbg_ThreadPushCall(#a); \
     502    ret = ((DBG_WINPROC36)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);         \
     503    dbg_ThreadPopCall(); \
     504    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     505    return ret;                            \
     506}
     507
     508#define NODEF_DEBUGWRAP40(a) \
     509DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10); \
     510DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10) \
     511{                                          \
     512    DWORD ret;                             \
     513    dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg7, arg8, arg9, arg10));         \
     514    dbg_ThreadPushCall(#a); \
     515    ret = ((DBG_WINPROC40)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);         \
     516    dbg_ThreadPopCall(); \
     517    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     518    return ret;                            \
     519}
     520
     521#define NODEF_DEBUGWRAP44(a) \
     522DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11); \
     523DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11) \
     524{                                          \
     525    DWORD ret;                             \
     526    dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg7, arg8, arg9, arg10, arg11));         \
     527    dbg_ThreadPushCall(#a); \
     528    ret = ((DBG_WINPROC44)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);         \
     529    dbg_ThreadPopCall(); \
     530    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     531    return ret;                            \
     532}
     533
     534#define NODEF_DEBUGWRAP48(a) \
     535DWORD WIN32API a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12); \
     536DWORD WIN32API Dbg##a(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12) \
     537{                                          \
     538    DWORD ret;                             \
     539    dprintf((DBGWRAP_MODULE": %s %x %x %x %x %x %x", #a, arg1, arg2, arg3, arg4, arg5, arg7, arg8, arg9, arg10, arg11, arg12));         \
     540    dbg_ThreadPushCall(#a); \
     541    ret = ((DBG_WINPROC48)a)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);         \
     542    dbg_ThreadPopCall(); \
     543    dprintf((DBGWRAP_MODULE": %s returned %x", #a, ret)); \
     544    return ret;                            \
     545}
     546
    355547#endif
    356548
Note: See TracChangeset for help on using the changeset viewer.