Source code of Windows XP (NT5)
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.

102 lines
3.0 KiB

  1. ;***
  2. ;exsup.inc
  3. ;
  4. ; Copyright (C) 1993-1997, Microsoft Corporation. All rights reserved.
  5. ;
  6. ;Purpose:
  7. ; Common data structures & definitions for exsup.asm and other
  8. ; Structured Exception Handling support modules.
  9. ;
  10. ;Revision History:
  11. ; 04-13-93 JWM Initial version
  12. ; 12-05-93 PML Update for C9.0
  13. ; 01-12-94 PML Move jmp_buf struct here, add new fields
  14. ; 01-13-95 JWM Added _NLG_INFO struct.
  15. ; 06-05-95 JWM Added uoffFramePointer to _NLG_INFO struct.
  16. ;
  17. ;******************************************************************************
  18. ;handler dispositions
  19. DISPOSITION_DISMISS equ 0
  20. DISPOSITION_CONTINUE_SEARCH equ 1
  21. DISPOSITION_NESTED_EXCEPTION equ 2
  22. DISPOSITION_COLLIDED_UNWIND equ 3
  23. ;filter return codes
  24. FILTER_ACCEPT equ 1
  25. FILTER_DISMISS equ -1
  26. FILTER_CONTINUE_SEARCH equ 0
  27. ;handler flags settings..
  28. EXCEPTION_UNWINDING equ 2
  29. EXCEPTION_EXIT_UNWIND equ 4
  30. EXCEPTION_UNWIND_CONTEXT equ EXCEPTION_UNWINDING OR EXCEPTION_EXIT_UNWIND
  31. TRYLEVEL_NONE equ -1
  32. TRYLEVEL_INVALID equ -2
  33. ;callback interface codes (mimimal required set)
  34. CB_GET_MAX_CODE equ 0
  35. CB_DO_LOCAL_UNWIND equ 1
  36. CB_GET_FRAME_EBP equ 2
  37. CB_GET_SCOPE_INDEX equ 3
  38. CB_GET_SCOPE_DATA equ 4
  39. MAX_CALLBACK_CODE equ 4
  40. ;typedef struct _EXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION;
  41. ;struct _EXCEPTION_REGISTRATION{
  42. ; struct _EXCEPTION_REGISTRATION *prev;
  43. ; void (*handler)(PEXCEPTION_RECORD, PEXCEPTION_REGISTRATION, PCONTEXT, PEXCEPTION_RECORD);
  44. ; struct scopetable_entry *scopetable;
  45. ; int trylevel;
  46. ; int _ebp;
  47. ; PEXCEPTION_POINTERS xpointers;
  48. ;};
  49. _EXCEPTION_REGISTRATION struc
  50. prev dd ?
  51. handler dd ?
  52. _EXCEPTION_REGISTRATION ends
  53. ;setjmp/longjmp buffer
  54. _JMP_BUF struc
  55. saved_ebp dd ?
  56. saved_ebx dd ?
  57. saved_edi dd ?
  58. saved_esi dd ?
  59. saved_esp dd ?
  60. saved_return dd ?
  61. saved_xregistration dd ?
  62. saved_trylevel dd ?
  63. ; following only found in C9.0 or later jmp_buf
  64. version_cookie dd ?
  65. unwind_func dd ?
  66. unwind_data dd 6 dup(?)
  67. _JMP_BUF ends
  68. ; Cookie placed in the jmp_buf to identify the new, longer form
  69. JMPBUF_COOKIE equ 'VC20'
  70. ; Offset of TryLevel in a C8.0 SEH registration node
  71. C8_TRYLEVEL equ 12
  72. ; NLG struct (debugging info)
  73. ;
  74. ; struct {
  75. ; unsigned long dwSig;
  76. ; unsigned long uoffDestination;
  77. ; unsigned long dwCode;
  78. ; unsigned long uoffFramePointer;
  79. ; } _NLG_Destination = {EH_MAGIC_NUMBER1,0,0,0};
  80. ;MAGIC_NUMBER1 equ 019930520h
  81. ;
  82. ;_NLG_INFO struc
  83. ; dwSig dd MAGIC_NUMBER1
  84. ; uoffDestination dd 0
  85. ; dwCode dd 0
  86. ; uoffFramePointer dd 0
  87. ;_NLG_INFO ends
  88. ; This constant is also defined in mtdll.h!
  89. ;_NLG_LOCK equ 01ah