mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.8 KiB
83 lines
1.8 KiB
/*++
|
|
|
|
Copyright (c) 1993-1999 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
precomp.h
|
|
|
|
Abstract:
|
|
|
|
This header file is used to cause the correct machine/platform specific
|
|
data structures to be used when compiling for a non-hosted platform.
|
|
|
|
--*/
|
|
|
|
// This is a 64 bit aware debugger extension
|
|
#define KDEXT_64BIT
|
|
|
|
#include <windows.h>
|
|
#include <wdbgexts.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <dbgeng.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
//
|
|
// undef the wdbgexts
|
|
//
|
|
#undef DECLARE_API
|
|
|
|
#define DECLARE_API(extension) \
|
|
CPPMOD HRESULT CALLBACK extension(PDEBUG_CLIENT Client, PCSTR args)
|
|
|
|
#define INIT_API() \
|
|
HRESULT Status; \
|
|
if ((Status = ExtQuery(Client)) != S_OK) return Status;
|
|
|
|
#define EXIT_API ExtRelease
|
|
|
|
|
|
// Safe release and NULL.
|
|
#define EXT_RELEASE(Unk) \
|
|
((Unk) != NULL ? ((Unk)->Release(), (Unk) = NULL) : NULL)
|
|
|
|
// Global variables initialized by query.
|
|
extern PDEBUG_ADVANCED g_ExtAdvanced;
|
|
extern PDEBUG_CLIENT g_ExtClient;
|
|
extern PDEBUG_CONTROL g_ExtControl;
|
|
extern PDEBUG_DATA_SPACES2 g_ExtData;
|
|
extern PDEBUG_REGISTERS g_ExtRegisters;
|
|
extern PDEBUG_SYMBOLS g_ExtSymbols;
|
|
extern PDEBUG_SYSTEM_OBJECTS g_ExtSystem;
|
|
|
|
extern ULONG64 STeip;
|
|
extern ULONG64 STebp;
|
|
extern ULONG64 STesp;
|
|
extern ULONG64 EXPRLastDump;
|
|
|
|
HRESULT
|
|
ExtQuery(PDEBUG_CLIENT Client);
|
|
|
|
void
|
|
ExtRelease(void);
|
|
|
|
|
|
//-----------------------------------------------------------------------------------------
|
|
//
|
|
// api declaration macros & api access macros
|
|
//
|
|
//-----------------------------------------------------------------------------------------
|
|
|
|
extern WINDBG_EXTENSION_APIS ExtensionApis;
|
|
extern ULONG TargetMachine;
|
|
extern ULONG g_TargetClass;
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|