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.

100 lines
2.8 KiB

  1. ;***
  2. ;exsup.inc
  3. ;
  4. ; Copyright (C) 1993-2001, 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. ; 02-16-01 PML _NLG_LOCK is obsolete
  17. ;
  18. ;******************************************************************************
  19. ;handler dispositions
  20. DISPOSITION_DISMISS equ 0
  21. DISPOSITION_CONTINUE_SEARCH equ 1
  22. DISPOSITION_NESTED_EXCEPTION equ 2
  23. DISPOSITION_COLLIDED_UNWIND equ 3
  24. ;filter return codes
  25. FILTER_ACCEPT equ 1
  26. FILTER_DISMISS equ -1
  27. FILTER_CONTINUE_SEARCH equ 0
  28. ;handler flags settings..
  29. EXCEPTION_UNWINDING equ 2
  30. EXCEPTION_EXIT_UNWIND equ 4
  31. EXCEPTION_UNWIND_CONTEXT equ EXCEPTION_UNWINDING OR EXCEPTION_EXIT_UNWIND
  32. TRYLEVEL_NONE equ -1
  33. TRYLEVEL_INVALID equ -2
  34. ;callback interface codes (mimimal required set)
  35. CB_GET_MAX_CODE equ 0
  36. CB_DO_LOCAL_UNWIND equ 1
  37. CB_GET_FRAME_EBP equ 2
  38. CB_GET_SCOPE_INDEX equ 3
  39. CB_GET_SCOPE_DATA equ 4
  40. MAX_CALLBACK_CODE equ 4
  41. ;typedef struct _EXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION;
  42. ;struct _EXCEPTION_REGISTRATION{
  43. ; struct _EXCEPTION_REGISTRATION *prev;
  44. ; void (*handler)(PEXCEPTION_RECORD, PEXCEPTION_REGISTRATION, PCONTEXT, PEXCEPTION_RECORD);
  45. ; struct scopetable_entry *scopetable;
  46. ; int trylevel;
  47. ; int _ebp;
  48. ; PEXCEPTION_POINTERS xpointers;
  49. ;};
  50. _EXCEPTION_REGISTRATION struc
  51. prev dd ?
  52. handler dd ?
  53. _EXCEPTION_REGISTRATION ends
  54. ;setjmp/longjmp buffer
  55. _JMP_BUF struc
  56. saved_ebp dd ?
  57. saved_ebx dd ?
  58. saved_edi dd ?
  59. saved_esi dd ?
  60. saved_esp dd ?
  61. saved_return dd ?
  62. saved_xregistration dd ?
  63. saved_trylevel dd ?
  64. ; following only found in C9.0 or later jmp_buf
  65. version_cookie dd ?
  66. unwind_func dd ?
  67. unwind_data dd 6 dup(?)
  68. _JMP_BUF ends
  69. ; Cookie placed in the jmp_buf to identify the new, longer form
  70. JMPBUF_COOKIE equ 'VC20'
  71. ; Offset of TryLevel in a C8.0 SEH registration node
  72. C8_TRYLEVEL equ 12
  73. ; NLG struct (debugging info)
  74. ;
  75. ; struct {
  76. ; unsigned long dwSig;
  77. ; unsigned long uoffDestination;
  78. ; unsigned long dwCode;
  79. ; unsigned long uoffFramePointer;
  80. ; } _NLG_Destination = {EH_MAGIC_NUMBER1,0,0,0};
  81. MAGIC_NUMBER1 equ 019930520h
  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