Windows NT 4.0 source code leak
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.

86 lines
1.2 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. walk.c
  5. Abstract:
  6. This file provides support for stack walking.
  7. Author:
  8. Wesley Witt (wesw) 1-May-1993
  9. Environment:
  10. User Mode
  11. --*/
  12. #include <windows.h>
  13. #include <stdlib.h>
  14. #include <stdio.h>
  15. #include <string.h>
  16. #include "drwatson.h"
  17. #include "proto.h"
  18. LPVOID
  19. SwFunctionTableAccess(
  20. PDEBUGPACKET dp,
  21. DWORD dwPCAddr
  22. )
  23. {
  24. return SymFunctionTableAccess( dp->hProcess, dwPCAddr );
  25. }
  26. DWORD
  27. SwGetModuleBase(
  28. PDEBUGPACKET dp,
  29. DWORD ReturnAddress
  30. )
  31. {
  32. IMAGEHLP_MODULE ModuleInfo;
  33. if (SymGetModuleInfo( dp->hProcess, ReturnAddress, &ModuleInfo )) {
  34. return ModuleInfo.BaseOfImage;
  35. }
  36. return 0;
  37. }
  38. BOOL
  39. SwReadProcessMemory(
  40. PDEBUGPACKET dp,
  41. LPCVOID lpBaseAddress,
  42. LPVOID lpBuffer,
  43. DWORD nSize,
  44. LPDWORD lpNumberOfBytesRead
  45. )
  46. {
  47. return DoMemoryRead(
  48. dp,
  49. lpBaseAddress,
  50. lpBuffer,
  51. nSize,
  52. lpNumberOfBytesRead
  53. );
  54. }
  55. DWORD
  56. SwTranslateAddress(
  57. PDEBUGPACKET dp,
  58. HANDLE hThread,
  59. LPADDRESS lpaddr
  60. )
  61. {
  62. return 0;
  63. }