xpcom/base/pure_api.c

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/base/pure_api.c	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,126 @@
     1.4 +/*
     1.5 + * Header file of Pure API function declarations.
     1.6 + *
     1.7 + * Explicitly no copyright.
     1.8 + * You may recompile and redistribute these definitions as required.
     1.9 + *
    1.10 + * NOTE1: In some situations when compiling with MFC, you should
    1.11 + *        enable the setting 'Not using precompiled headers' in Visual C++
    1.12 + *        to avoid a compiler diagnostic.
    1.13 + *
    1.14 + * NOTE2: This file works through the use of deep magic.  Calls to functions
    1.15 + *        in this file are replaced with calls into the OCI runtime system
    1.16 + *        when an instrumented version of this program is run.
    1.17 + *
    1.18 + * NOTE3: The static vars avoidGy_n (where n is a unique number) are used
    1.19 + *        to prevent optimizing the functions away when compiler option
    1.20 + *        /Gy is set. This is needed so that NOTE2 works properly.
    1.21 + */
    1.22 +static int avoidGy_1;
    1.23 +static int avoidGy_2;
    1.24 +static int avoidGy_3;
    1.25 +static int avoidGy_4;
    1.26 +static int avoidGy_5;
    1.27 +static int avoidGy_6;
    1.28 +static int avoidGy_7;
    1.29 +static int avoidGy_8;
    1.30 +static int avoidGy_9;
    1.31 +static int avoidGy_10;
    1.32 +static int avoidGy_11;
    1.33 +static int avoidGy_12;
    1.34 +static int avoidGy_13;
    1.35 +static int avoidGy_14;
    1.36 +static int avoidGy_15;
    1.37 +static int avoidGy_16;
    1.38 +static int avoidGy_17;
    1.39 +static int avoidGy_18;
    1.40 +static int avoidGy_19;
    1.41 +static int avoidGy_20;
    1.42 +static int avoidGy_21;
    1.43 +static int avoidGy_22;
    1.44 +static int avoidGy_23;
    1.45 +static int avoidGy_24;
    1.46 +static int avoidGy_25;
    1.47 +static int avoidGy_26;
    1.48 +static int avoidGy_27;
    1.49 +static int avoidGy_28;
    1.50 +static int avoidGy_29;
    1.51 +static int avoidGy_30;
    1.52 +static int avoidGy_31;
    1.53 +static int avoidGy_32;
    1.54 +static int avoidGy_33;
    1.55 +static int avoidGy_34;
    1.56 +static int avoidGy_35;
    1.57 +static int avoidGy_36;
    1.58 +static int avoidGy_37;
    1.59 +static int avoidGy_38;
    1.60 +static int avoidGy_39;
    1.61 +static int avoidGy_40;
    1.62 +static int avoidGy_41;
    1.63 +static int avoidGy_42;
    1.64 +static int avoidGy_43;
    1.65 +static int avoidGy_44;
    1.66 +static int avoidGy_45;
    1.67 +static int avoidGy_46;
    1.68 +static int avoidGy_47;
    1.69 +static int avoidGy_48;
    1.70 +static int avoidGy_49;
    1.71 +static int avoidGy_50;
    1.72 +static int avoidGy_51;
    1.73 +static int avoidGy_52;
    1.74 +static int avoidGy_53;
    1.75 +static int avoidGy_54;
    1.76 +static int avoidGy_55;
    1.77 +static int avoidGy_56;
    1.78 +static int avoidGy_57;
    1.79 +static int avoidGy_58;
    1.80 +static int avoidGy_59;
    1.81 +static int avoidGy_60;
    1.82 +static int avoidGy_PL_01;
    1.83 +__declspec(dllexport) int __cdecl PurePrintf(const char *fmt, ...) { avoidGy_1++; fmt; return 0; }
    1.84 +__declspec(dllexport) int __cdecl PurifyIsRunning(void) { avoidGy_2++; return 0; }
    1.85 +__declspec(dllexport) int __cdecl PurifyPrintf(const char *fmt, ...) { avoidGy_3++; fmt; return 0; }
    1.86 +__declspec(dllexport) int __cdecl PurifyNewInuse(void) { avoidGy_4++; return 0; }
    1.87 +__declspec(dllexport) int __cdecl PurifyAllInuse(void) { avoidGy_5++; return 0; }
    1.88 +__declspec(dllexport) int __cdecl PurifyClearInuse(void) { avoidGy_6++; return 0; }
    1.89 +__declspec(dllexport) int __cdecl PurifyNewLeaks(void) { avoidGy_7++; return 0; }
    1.90 +__declspec(dllexport) int __cdecl PurifyAllLeaks(void) { avoidGy_8++; return 0; }
    1.91 +__declspec(dllexport) int __cdecl PurifyClearLeaks(void) { avoidGy_9++; return 0; }
    1.92 +__declspec(dllexport) int __cdecl PurifyAllHandlesInuse(void) { avoidGy_10++; return 0; }
    1.93 +__declspec(dllexport) int __cdecl PurifyNewHandlesInuse(void) { avoidGy_11++; return 0; }
    1.94 +__declspec(dllexport) int __cdecl PurifyDescribe(void *addr) { avoidGy_12++; addr; return 0; }
    1.95 +__declspec(dllexport) int __cdecl PurifyWhatColors(void *addr, int size) { avoidGy_13++; addr; size; return 0; }
    1.96 +__declspec(dllexport) int __cdecl PurifyAssertIsReadable(const void *addr, int size) { avoidGy_14++; addr; size; return 1; }
    1.97 +__declspec(dllexport) int __cdecl PurifyAssertIsWritable(const void *addr, int size) { avoidGy_15++; addr; size; return 1; }
    1.98 +__declspec(dllexport) int __cdecl PurifyIsReadable(const void *addr, int size) { avoidGy_16++; addr; size; return 1; }
    1.99 +__declspec(dllexport) int __cdecl PurifyIsWritable(const void *addr, int size) { avoidGy_17++; addr; size; return 1; }
   1.100 +__declspec(dllexport) int __cdecl PurifyIsInitialized(const void *addr, int size) { avoidGy_18++; addr; size; return 1; }
   1.101 +__declspec(dllexport) int __cdecl PurifyRed(void *addr, int size) { avoidGy_19++; addr; size; return 0; }
   1.102 +__declspec(dllexport) int __cdecl PurifyGreen(void *addr, int size) { avoidGy_20++; addr; size; return 0; }
   1.103 +__declspec(dllexport) int __cdecl PurifyYellow(void *addr, int size) { avoidGy_21++; addr; size; return 0; }
   1.104 +__declspec(dllexport) int __cdecl PurifyBlue(void *addr, int size) { avoidGy_22++; addr; size; return 0; }
   1.105 +__declspec(dllexport) int __cdecl PurifyMarkAsInitialized(void *addr, int size) { avoidGy_23++; addr; size; return 0; }
   1.106 +__declspec(dllexport) int __cdecl PurifyMarkAsUninitialized(void *addr, int size) { avoidGy_24++; addr; size; return 0; }
   1.107 +__declspec(dllexport) int __cdecl PurifyMarkForTrap(void *addr, int size) { avoidGy_25++; addr; size; return 0; }
   1.108 +__declspec(dllexport) int __cdecl PurifyMarkForNoTrap(void *addr, int size) { avoidGy_26++; addr; size; return 0; }
   1.109 +__declspec(dllexport) int __cdecl PurifyHeapValidate(unsigned int hHeap, unsigned int dwFlags, const void *addr) 
   1.110 + { avoidGy_27++; hHeap; dwFlags; addr; return 1; }
   1.111 +__declspec(dllexport) int __cdecl PurifySetLateDetectScanCounter(int counter) { avoidGy_28++; counter; return 0; };
   1.112 +__declspec(dllexport) int __cdecl PurifySetLateDetectScanInterval(int seconds) { avoidGy_29++; seconds; return 0; };
   1.113 +__declspec(dllexport) int __cdecl CoverageIsRunning(void) { avoidGy_30++; return 0; }
   1.114 +__declspec(dllexport) int __cdecl CoverageDisableRecordingData(void) { avoidGy_31++; return 0; }
   1.115 +__declspec(dllexport) int __cdecl CoverageStartRecordingData(void) { avoidGy_32++; return 0; }
   1.116 +__declspec(dllexport) int __cdecl CoverageStopRecordingData(void) { avoidGy_33++; return 0; }
   1.117 +__declspec(dllexport) int __cdecl CoverageClearData(void) { avoidGy_34++; return 0; }
   1.118 +__declspec(dllexport) int __cdecl CoverageIsRecordingData(void) { avoidGy_35++; return 0; }
   1.119 +__declspec(dllexport) int __cdecl CoverageAddAnnotation(char *str) { avoidGy_36++; str; return 0; }
   1.120 +__declspec(dllexport) int __cdecl CoverageSaveData(void) { avoidGy_37++; return 0; }
   1.121 +__declspec(dllexport) int __cdecl QuantifyIsRunning(void) { avoidGy_42++; return 0; }
   1.122 +__declspec(dllexport) int __cdecl QuantifyDisableRecordingData(void) { avoidGy_43++; return 0; }
   1.123 +__declspec(dllexport) int __cdecl QuantifyStartRecordingData(void) { avoidGy_44++; return 0; }
   1.124 +__declspec(dllexport) int __cdecl QuantifyStopRecordingData(void) { avoidGy_45++; return 0; }
   1.125 +__declspec(dllexport) int __cdecl QuantifyClearData(void) { avoidGy_46++; return 0; }
   1.126 +__declspec(dllexport) int __cdecl QuantifyIsRecordingData(void) { avoidGy_47++; return 0; }
   1.127 +__declspec(dllexport) int __cdecl QuantifyAddAnnotation(char *str) { avoidGy_48++; str; return 0; }
   1.128 +__declspec(dllexport) int __cdecl QuantifySaveData(void) { avoidGy_49++; return 0; }
   1.129 +__declspec(dllexport) int __cdecl PurelockIsRunning(void) { avoidGy_PL_01++; return 0; }

mercurial