1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
|
/* Copyright (C) 2010 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* bring in dbghelp library.
*/
#ifndef INCLUDED_DBGHELP
#define INCLUDED_DBGHELP
#include "lib/sysdep/os/win/win.h"
#include <OAIdl.h> // VARIANT
#if MSC_VERSION
# pragma comment(lib, "oleaut32.lib") // VariantChangeType
#endif
//-----------------------------------------------------------------------------
// fix omissions in the VC PSDK's dbghelp.h
// the macros defined "for those without specstrings.h" are incorrect -
// parameter definition is missing.
#ifndef __specstrings
# define __specstrings // prevent dbghelp from changing these
# define __in
# define __out
# define __inout
# define __in_opt
# define __out_opt
# define __inout_opt
# define __in_ecount(s)
# define __out_ecount(s)
# define __inout_ecount(s)
# define __in_bcount(s)
# define __out_bcount(s)
# define __inout_bcount(s)
# define __deref_opt_out
# define __deref_out
#endif
// (VC2005 defines __specstrings, but doesn't define (or use) __out_xcount,
// so this is not inside the above #ifndef section)
//
// missing from dbghelp's list
#ifndef __out_xcount
# define __out_xcount(s)
#endif
//
// not defined by dbghelp; these values are taken from DIA cvconst.h
//
enum BasicType
{
btNoType = 0,
btVoid = 1,
btChar = 2,
btWChar = 3,
btInt = 6,
btUInt = 7,
btFloat = 8,
btBCD = 9,
btBool = 10,
btLong = 13,
btULong = 14,
btCurrency = 25,
btDate = 26,
btVariant = 27,
btComplex = 28,
btBit = 29,
btBSTR = 30,
btHresult = 31
};
enum DataKind
{
DataIsUnknown,
DataIsLocal,
DataIsStaticLocal,
DataIsParam,
DataIsObjectPtr,
DataIsFileStatic,
DataIsGlobal,
DataIsMember,
DataIsStaticMember,
DataIsConstant
};
//-----------------------------------------------------------------------------
#if ICC_VERSION
# pragma warning(push)
# pragma warning(disable:94) // the size of an array must be greater than zero
# pragma warning(disable:271) // trailing comma is nonstandard
# pragma warning(disable:418) // declaration requires a typedef name
# pragma warning(disable:791) // calling convention specified more than once
#endif
#pragma pack(push, 8) // seems to be required
#define _NO_CVCONST_H // request SymTagEnum be defined
#include <dbghelp.h> // must come after win.h and the above definitions
#pragma pack(pop)
#if ICC_VERSION
# pragma warning(pop)
#endif
//-----------------------------------------------------------------------------
// rationale: Debugging Tools For Windows includes newer header/lib files,
// but they're not redistributable. since we don't want everyone to
// have to install that, it's preferable to link dynamically.
// declare function pointers
#define FUNC(ret, name, params) EXTERN_C ret (__stdcall *p##name) params;
#include "lib/external_libraries/dbghelp_funcs.h"
#undef FUNC
extern void dbghelp_ImportFunctions();
#endif // #ifndef INCLUDED_DBGHELP
|