debug_stack.inl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. // Used for dynamically linking to dbghelp.dll functions.
  19. // keep this always as first entry
  20. DBGHELP(SymInitialize,
  21. BOOL,
  22. (HANDLE hProcess, PCSTR UserSearchPath, BOOL fInvadeProcess))
  23. DBGHELP(SymGetOptions,
  24. DWORD,
  25. (void))
  26. DBGHELP(SymSetOptions,
  27. DWORD,
  28. (DWORD SymOptions))
  29. DBGHELP(StackWalk,
  30. BOOL,
  31. (DWORD MachineType, HANDLE hProcess, HANDLE hThread, LPSTACKFRAME StackFrame,
  32. LPVOID ContextRecord, PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
  33. PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
  34. PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
  35. PTRANSLATE_ADDRESS_ROUTINE TranslateAddress))
  36. DBGHELP(SymFunctionTableAccess,
  37. LPVOID,
  38. (HANDLE hProcess, DWORD AddrBase))
  39. DBGHELP(SymGetModuleBase,
  40. DWORD,
  41. (HANDLE hProcess, DWORD dwAddr))
  42. DBGHELP(SymGetSymFromAddr,
  43. BOOL,
  44. (HANDLE hProcess, DWORD Address, LPDWORD Displacement,
  45. PIMAGEHLP_SYMBOL Symbol))
  46. DBGHELP(SymGetLineFromAddr,
  47. BOOL,
  48. (HANDLE hProcess, DWORD dwAddr, PDWORD pdwDisplacement,
  49. PIMAGEHLP_LINE Line))
  50. // keep this always as last entry
  51. DBGHELP(SymCleanup,
  52. BOOL,
  53. (HANDLE hProcess))