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