--- q_a/samples/ntsd/debug.c 2018/08/09 18:29:19 1.1.1.1 +++ q_a/samples/ntsd/debug.c 2018/08/09 18:29:36 1.1.1.2 @@ -20,19 +20,35 @@ * (#includes) * \**************************************************************************/ +#include +#include + #include #include #include + #include -#include -#include + +typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; + #include #include "mditypes.h" +// +// don't use try/except here. Otherwise, mip2coff -c chokes with the +// following fatal error on MIPS: +// tried to get local variable absolute addr with no procedure +// +// NTSD will catch the fault anyway +// +// Alternatively, we can get rid of the -c switch on mip2coff in the +// module that use try/except, but we won't have any locals for the module +// +// Petrus Wong 05-Oct-1992 +// #define move(dst, src)\ -try {\ +{\ ReadProcessMemory(hCurrentProcess, (LPVOID)(src), &(dst), sizeof(dst), NULL);\ -} except (EXCEPTION_EXECUTE_HANDLER) {\ return;\ } @@ -53,7 +69,7 @@ try {\ * Wrote it. \**************************************************************************/ -INT APIENTRY LibMain(HANDLE hInst, DWORD ul_reason_being_called, LPVOID lpReserved) +INT WINAPI LibMain(HANDLE hInst, DWORD ul_reason_being_called, LPVOID lpReserved) { return 1; UNREFERENCED_PARAMETER(hInst);