!*** MODULE LIBICB IDENT V2.0 *** !DEC$ OPTIONS/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)/NOWARN PARAMETER LIB$K_PROC_VALUE_NULL = '00000000'X PARAMETER LIB$K_INVO_HANDLE_NULL = '00000000'X PARAMETER LIBICB$K_INVO_HANDLE_SIZE = '00000008'X PARAMETER LIBICB$K_INVO_CONTEXT_VERSION = '00000002'X ! The header quadword contains: PARAMETER LIBICB$M_FFLAGS_BITS = '00FFFFFF'X PARAMETER LIBICB$M_BOTTOM_OF_STACK = '00000001'X PARAMETER LIBICB$M_HANDLER_PRESENT = '00000002'X PARAMETER LIBICB$M_IN_PROLOGUE = '00000004'X PARAMETER LIBICB$M_IN_EPILOGUE = '00000008'X PARAMETER LIBICB$M_HAS_MEM_STK_FRAME = '00000010'X PARAMETER LIBICB$M_HAS_REG_STK_FRAME = '00000020'X PARAMETER LIBICB$K_INVO_CONTEXT_T_LENGTH = '00000760'X PARAMETER LIBICB$K_SDA_COPY_LENGTH = '000007A8'X PARAMETER LIBICB$M_UO_FLAG_CACHE_UNWIND = '00000001'X PARAMETER LIBICB$M_UO_FLAG_EMULATION_MODE = '00000002'X PARAMETER LIBICB$K_UO_LENGTH = '00000058'X ! PARAMETER LIBICB$m_using_client_memread = '00000001'X PARAMETER LIBICB$m_my_mode = '00000006'X PARAMETER LIBICB$K_CONTEXT_BLK_SIZE = '00000820'X ! The following is an "internal" area that's reserved for use by PARAMETER LIBICB$K_REGION_BLK_SIZE = '00000448'X PARAMETER LIBICB$K_REGIONLABEL_BLK_SIZE = '00000020'X PARAMETER LIBICB$K_DESCRIPTOR_BLK_SIZE = '00000500'X ! Action codes: PARAMETER LIBICB$K_ACTION_KP_FIND_UNWIND = '00000001'X ! override call to exe$kp_find_unwind_cont ! prototype: ! uint64 sp = action_routine (enum action_code code, uint64 sp, uint64 ident); PARAMETER LIBICB$K_ACTION_USE_DEFAULT = -1 ! action routine return value to "use default" ! Alert codes: (matches _UNW_ReturnCode enum in unwind.h) PARAMETER LIBICB$K_AC_STEP_KRNL_SAV_STATE = -2 ! _UNW_STEP_KERNEL_SAVE_STATE = -2 PARAMETER LIBICB$K_AC_STEP_BOTTOM = -1 ! _UNW_STEP_BOTTOM PARAMETER LIBICB$K_AC_OK = '00000000'X ! _UNW_OK = 0 PARAMETER LIBICB$K_AC_STEP_ERROR = '00000001'X ! _UNW_STEP_ERROR PARAMETER LIBICB$K_AC_STEP_INVALID_IP = '00000002'X ! _UNW_STEP_INVALID_IP PARAMETER LIBICB$K_AC_STEP_INVALID_SP = '00000003'X ! _UNW_STEP_INVALID_SP PARAMETER LIBICB$K_AC_STEP_INVALID_GR = '00000004'X ! _UNW_STEP_INVALID_GR PARAMETER LIBICB$K_AC_STEP_INVALID_PFS = '00000005'X ! _UNW_STEP_INVALID_PFS PARAMETER LIBICB$K_AC_STEP_INVALID_RSC = '00000006'X ! _UNW_STEP_INVALID_RSC PARAMETER LIBICB$K_AC_STEP_INVALID_BSP = '00000007'X ! _UNW_STEP_INVALID_BSP PARAMETER LIBICB$K_AC_STEP_INV_BSPSTORE = '00000008'X ! _UNW_STEP_INVALID_BSPSTORE PARAMETER LIBICB$K_AC_STEP_INVALID_CFM = '00000009'X ! _UNW_STEP_INVALID_CFM PARAMETER LIBICB$K_AC_STEP_INVALID_BR = '0000000A'X ! _UNW_STEP_INVALID_BR PARAMETER LIBICB$K_AC_STEP_BAD_BSP_ALIGN = '0000000B'X ! _UNW_STEP_BAD_BSP_ALIGNMENT PARAMETER LIBICB$K_AC_STEP_INVALID_RNAT = '0000000C'X ! _UNW_STEP_INVALID_RNAT PARAMETER LIBICB$K_AC_STEP_NODSC4_NONLEAF = '0000000D'X ! _UNW_STEP_NO_DESCRIPTOR_FOR_NON_LEAF PARAMETER LIBICB$K_AC_STEP_CORRUPT_DESC = '0000000E'X ! _UNW_STEP_CORRUPT_DESCRIPTOR PARAMETER LIBICB$K_AC_STEP_RSE_NOT_FLUSHD = '0000000F'X ! _UNW_STEP_RSE_NOT_FLUSHED PARAMETER LIBICB$K_AC_STEP_SIGNAL_CONTEXT = '00000010'X ! _UNW_STEP_SIGNAL_CONTEXT PARAMETER LIBICB$K_AC_STEP_BAD_STATE = '00000011'X ! _UNW_STEP_NOT_ALLOWED_IN_STATE PARAMETER LIBICB$K_AC_INIT_RANGE_ERROR = '00000012'X ! _UNW_INITIALIZATION_RANGE_ERROR PARAMETER LIBICB$K_AC_QUERY_RANGE_ERROR = '00000013'X ! _UNW_QUERY_RANGE_ERROR PARAMETER LIBICB$K_AC_QUERY_INVALID_ERROR = '00000014'X ! _UNW_QUERY_INVALID_ERROR PARAMETER LIBICB$K_AC_SET_BAD_STATE = '00000015'X ! _UNW_SET_NOT_ALLOWED_IN_STATE PARAMETER LIBICB$K_AC_CURR_CTXT_FAILED = '00000016'X ! _UNW_CURRENT_CONTEXT_FAILED PARAMETER LIBICB$K_AC_CURR_CTXT_BAD_STATE = '00000017'X ! _UNW_CURRENT_CONTEXT_NOT_ALLOWED_IN_STATE PARAMETER LIBICB$K_AC_MEMORY_ALLOC_ERROR = '00000018'X ! _UNW_MEMORY_ALLOCATION_ERROR PARAMETER LIBICB$K_AC_CLEAR_BAD_STATE = '00000019'X ! _UNW_CLEAR_NOT_ALLOWED_IN_STATE PARAMETER LIBICB$K_AC_QUERY_BAD_STATE = '0000001A'X ! _UNW_QUERY_NOT_ALLOWED_IN_STATE PARAMETER LIBICB$K_AC_INTERNAL_ERROR = '0000001B'X ! _UNW_INTERNAL_ERROR PARAMETER LIBICB$K_AC_STEP_I_ABI_MISMATCH = '0000001C'X ! _UNW_STEP_INTERRUPTION_ABI_MISMATCH PARAMETER LIBICB$K_AC_UNALIGNED_ICB = '0000001D'X ! _UNW_UNALIGNED_ICB PARAMETER LIBICB$K_AC_READ_MEM_FAILURE = '0000001E'X ! _UNW_READ_MEMORY_FAILURE PARAMETER LIBICB$K_AC_WRITE_MEM_FAILURE = '0000001F'X ! _UNW_WRITE_MEMORY_FAILURE PARAMETER LIBICB$K_AC_WRITE_REG_FAILURE = '00000020'X ! _UNW_WRITE_REGISTER_FAILURE PARAMETER LIBICB$K_AC_UO_INCON_CALLBACK = '00000021'X ! _UNW_USER_OVERRIDE_INCONSISTENT_CALLBACK_ PARAMETER LIBICB$K_AC_PUT_REG_INVALID = '00000022'X ! _UNW_PUT_REGISTER_INVALID PARAMETER LIBICB$K_INVO_CONTEXT_BLK_SIZE = '00000840'X STRUCTURE /INVO_CONTEXT_BLK/ ! ! The length of the structure in bytes (a longword field), ! The frame flags (a 3 byte field of bits), and ! The version number (a 1 byte field) UNION MAP INTEGER*8 LIBICB$IH_HEADER ! Header (length, flags, version) END MAP MAP INTEGER*4 LIBICB$L_CONTEXT_LENGTH UNION MAP PARAMETER LIBICB$S_FFLAGS_BITS = 24 PARAMETER LIBICB$V_FFLAGS_BITS = 0 BYTE %FILL (3) END MAP MAP PARAMETER LIBICB$S_BOTTOM_OF_STACK = 1 PARAMETER LIBICB$V_BOTTOM_OF_STACK = 0 PARAMETER LIBICB$S_HANDLER_PRESENT = 1 PARAMETER LIBICB$V_HANDLER_PRESENT = 1 PARAMETER LIBICB$S_IN_PROLOGUE = 1 PARAMETER LIBICB$V_IN_PROLOGUE = 2 PARAMETER LIBICB$S_IN_EPILOGUE = 1 PARAMETER LIBICB$V_IN_EPILOGUE = 3 PARAMETER LIBICB$S_HAS_MEM_STK_FRAME = 1 PARAMETER LIBICB$V_HAS_MEM_STK_FRAME = 4 PARAMETER LIBICB$S_HAS_REG_STK_FRAME = 1 PARAMETER LIBICB$V_HAS_REG_STK_FRAME = 5 BYTE %FILL (1) END MAP END UNION BYTE LIBICB$B_BLOCK_VERSION END MAP END UNION INTEGER*8 %FILL ! Start of context_t must be octaword aligned ! ***** Start of context_t ****************** ! ! a context_t structure should be octaword (16-byte) aligned, and is passed by ! reference to the "get initial context" callback routine and establishes ! the "current" state of the machine and forms the inital context for for unwinding. ! UNION MAP INTEGER*8 LIBICB$IH_IREG(0:127) ! General (integer) Registers END MAP ! 32 static registers, plus ! up to 96 stacked/rotating registers MAP INTEGER*8 LIBICB$ih_i_used0 ! R0 INTEGER*8 LIBICB$IH_GP ! synonym for R1 (Global Data Pointer) INTEGER*8 %FILL(2:11) ! R2 - R11 INTEGER*8 LIBICB$IH_SP ! synonym for R12 (Memory Stack Pointer) INTEGER*8 LIBICB$IH_TP ! synonym for R13 (Thread Pointer) INTEGER*8 %FILL(14:24) ! R14 - R24 INTEGER*8 LIBICB$IH_AI ! synonym for R25 (Argument Information register) INTEGER*8 %FILL(26:127) ! R26 - R127 END MAP END UNION INTEGER*8 LIBICB$IH_GRNAT(0:1) ! General Register NaT Collection Registers INTEGER*4 LIBICB$FO_F2_F31(4,2:31) ! Floating Point Registers. ! 32 static floating point registers. ! Floating Point Registers are 82 bits wide ! but stored here in octawords. INTEGER*8 LIBICB$PH_F32_F127 ! Pointer to upper Floating Register save ! area. Zero if not saved. INTEGER*8 LIBICB$IH_BRANCH(0:7) ! Branch Registers ! Application Registers (ARs) ! INTEGER*8 LIBICB$IH_RSC ! Register Stack Configuration Register INTEGER*8 LIBICB$IH_BSP ! Backing store pointer INTEGER*8 LIBICB$IH_BSPSTORE ! Backing store write pointer INTEGER*8 LIBICB$IH_RNAT ! RSE NaT Collection Register INTEGER*8 LIBICB$IH_CCV ! Compare & Exchange Value Register INTEGER*8 LIBICB$IH_UNAT ! User NaT Collection Register INTEGER*8 LIBICB$FH_FPSR ! OBSOLETE - do not rely on the contents of this field. INTEGER*8 LIBICB$IH_PFS ! Previous Function State INTEGER*8 LIBICB$IH_LC ! Loop Count Register INTEGER*8 LIBICB$IH_EC ! Epilogue Count Register INTEGER*8 LIBICB$IH_CSD ! Copy of AR.CSD INTEGER*8 LIBICB$IH_SSD ! Copy of AR.SSD ! ! End ARs INTEGER*4 LIBICB$Q_PRED(2) ! Predicate Collection Register, PR0-PR63 INTEGER*8 LIBICB$IH_PC ! Current PC (Instruction Pointer + slot) UNION MAP INTEGER*8 LIBICB$IH_CFM ! Current Frame Marker END MAP MAP PARAMETER LIBICB$S_SOF = 7 PARAMETER LIBICB$V_SOF = 0 ! Size of stack frame PARAMETER LIBICB$S_SOL = 7 PARAMETER LIBICB$V_SOL = 7 ! Size of locals portion of stack frame PARAMETER LIBICB$S_SOR = 4 PARAMETER LIBICB$V_SOR = 14 ! Size of rotating portion of stack frame PARAMETER LIBICB$S_RRB_GR = 7 PARAMETER LIBICB$V_RRB_GR = 18 ! Register Rename Base for General Registers PARAMETER LIBICB$S_RRB_FR = 7 PARAMETER LIBICB$V_RRB_FR = 25 ! Register Rename Base for Floating-point Registers PARAMETER LIBICB$S_RRB_PR = 6 PARAMETER LIBICB$V_RRB_PR = 32 ! Register Rename Base for Predicate Registers BYTE %FILL (5) END MAP END UNION UNION MAP INTEGER*8 LIBICB$IH_UM ! User Mask bits of the PSR. END MAP MAP PARAMETER LIBICB$S_BE = 1 PARAMETER LIBICB$V_BE = 1 ! Big-endian memory access enable PARAMETER LIBICB$S_UP = 1 PARAMETER LIBICB$V_UP = 2 ! User performance monitor enable PARAMETER LIBICB$S_AC = 1 PARAMETER LIBICB$V_AC = 3 ! Alignment check data memory references PARAMETER LIBICB$S_MFL = 1 PARAMETER LIBICB$V_MFL = 4 ! Lower (F2-F31) Floating-point registers written PARAMETER LIBICB$S_MFH = 1 PARAMETER LIBICB$V_MFH = 5 ! Upper (F32-F127) Floating-point registers written BYTE %FILL (1) END MAP END UNION INTEGER*8 LIBICB$ih_next_bsp ! Next frame's Backing Store Pointer (Internal use) INTEGER*8 LIBICB$ih_next_pfs ! Next frame's Previous Frame State (Internal use) ! The following two locations are used when walking from an inner ! mode stack to an outer mode and context has been saved in a INTSK structure, ! but the outer mode stacked registers have bee saved on the inner mode RSE backing store. ! INTEGER*8 LIBICB$ih_bspbase ! Base for outer mode stacked registers saved in ! inner mode RSE backing store (Internal use) INTEGER*8 LIBICB$ih_intstk_rnat ! RNAT as saved in INTSTK (Internal use) ! the following "valid" bitmasks are used to record the validity ! of a given register for this context INTEGER*4 LIBICB$O_GR_VALID(4) ! General Register validity mask INTEGER*4 LIBICB$L_FR_VALID ! F2 - F31 validity mask (bit 2 for F2) INTEGER*4 LIBICB$l_fr_valid_fill INTEGER*4 LIBICB$Q_BR_VALID(2) ! Branch Register validity mask UNION MAP INTEGER*4 LIBICB$Q_AR_VALID(2) ! Application Register validity mask END MAP MAP PARAMETER LIBICB$S_RSC_VALID = 1 PARAMETER LIBICB$V_RSC_VALID = 0 ! Register Stack Configuration Register PARAMETER LIBICB$S_BSP_VALID = 1 PARAMETER LIBICB$V_BSP_VALID = 1 ! Backing store pointer PARAMETER LIBICB$S_BSPSTORE_VALID = 1 PARAMETER LIBICB$V_BSPSTORE_VALID = 2 ! Backing store write pointer PARAMETER LIBICB$S_RNAT_VALID = 1 PARAMETER LIBICB$V_RNAT_VALID = 3 ! RSE NaT Collection Register PARAMETER LIBICB$S_CCV_VALID = 1 PARAMETER LIBICB$V_CCV_VALID = 4 ! Compare & Exchange Value Register PARAMETER LIBICB$S_UNAT_VALID = 1 PARAMETER LIBICB$V_UNAT_VALID = 5 ! User NaT Collection Register PARAMETER LIBICB$S_FPSR_VALID = 1 PARAMETER LIBICB$V_FPSR_VALID = 6 ! Floating Point Status Register. PARAMETER LIBICB$S_PFS_VALID = 1 PARAMETER LIBICB$V_PFS_VALID = 7 ! Previous Function State PARAMETER LIBICB$S_LC_VALID = 1 PARAMETER LIBICB$V_LC_VALID = 8 ! Loop Count Register PARAMETER LIBICB$S_EC_VALID = 1 PARAMETER LIBICB$V_EC_VALID = 9 ! Epilogue Count Register PARAMETER LIBICB$S_CSD_VALID = 1 PARAMETER LIBICB$V_CSD_VALID = 10 ! Copy of AR.CSD PARAMETER LIBICB$S_SSD_VALID = 1 PARAMETER LIBICB$V_SSD_VALID = 11 ! Copy of AR.SSD BYTE %FILL (2) END MAP END UNION UNION MAP INTEGER*4 LIBICB$Q_OTHER_VALID(2) ! PC, CFM validity mask END MAP MAP PARAMETER LIBICB$S_PC_VALID = 1 PARAMETER LIBICB$V_PC_VALID = 0 ! Current PC PARAMETER LIBICB$S_CFM_VALID = 1 PARAMETER LIBICB$V_CFM_VALID = 1 ! Current Frame Marker PARAMETER LIBICB$S_UM_VALID = 1 PARAMETER LIBICB$V_UM_VALID = 2 ! User Mask field of PSR. BYTE %FILL (1) END MAP END UNION INTEGER*4 LIBICB$Q_PR_VALID(2) ! Predicate Register validity mask INTEGER*8 LIBICB$IH_ORIGINAL_SPILL_ADDR ! Original address of GR spill area (&LIBICB$IH_IREG[ ! (needed for NaT bit podition calculations) INTEGER*8 LIBICB$ih_true_psp ! True Previous SP (for Invo Handle) INTEGER*8 LIBICB$ih_spare_03 INTEGER*8 LIBICB$ih_spare_04 INTEGER*8 LIBICB$ih_spare_05 INTEGER*8 LIBICB$ih_spare_06 INTEGER*8 LIBICB$ih_spare_07 INTEGER*8 LIBICB$ih_spare_08 ! INTEGER*8 LIBICB$IH_PSP ! SP at entry to routine (Previous SP) INTEGER*8 LIBICB$ih_psp_valid ! PreviousSP valid INTEGER*8 LIBICB$IH_RETURN_PC ! Return PC for SDA. INTEGER*8 LIBICB$IH_PREV_BSP ! BSP of preceding frame for SDA. INTEGER*8 LIBICB$PH_CHFCTX_ADDR ! Pointer to condition handler facility context block INTEGER*8 LIBICB$PH_OTHER ! Pointer to other interesting structure (if any) INTEGER*8 LIBICB$IH_OSSD ! Copy of OSSD from Unwind Information Block INTEGER*8 LIBICB$IH_HANDLER_FV ! Condition Handler Function Value INTEGER*8 LIBICB$PH_LSDA ! Virtual Address of LSD area of UIB INTEGER*8 LIBICB$ph_desc ! Pointer to _Unwind_Descriptor structure (Internal use) INTEGER*8 LIBICB$ph_history ! Pointer to _Unwind_History structure (Internal use) ! ! The following locations can be used to alter the default behavior ! Typically this would be used for cross-process unwinding, and ! specifying an alternative memory allocation scheme. UNION MAP INTEGER*4 LIBICB$R_UO_BASE ! base of User Override area END MAP MAP INTEGER*4 LIBICB$Q_UO_FLAGS(2) ! operational flags END MAP MAP PARAMETER LIBICB$S_UO_FLAG_CACHE_UNWIND = 1 PARAMETER LIBICB$V_UO_FLAG_CACHE_UNWIND = 0 ! cache unwind information between calls ! for effiecient stack walk. PARAMETER LIBICB$S_UO_FLAG_EMULATION_MODE = 1 PARAMETER LIBICB$V_UO_FLAG_EMULATION_MODE = 1 ! Internal use only BYTE %FILL (1) END MAP END UNION INTEGER*8 LIBICB$IH_UO_IDENT ! user context variable, passed by value ! to the following callback routines. INTEGER*8 LIBICB$PH_UO_READ_MEM ! Pointer to user "read memory" routine INTEGER*8 LIBICB$PH_UO_GETUEINFO ! Pointer to user "get Unwind Entry Information" routine INTEGER*8 LIBICB$PH_UO_GETCONTEXT ! Pointer to user "get Initial Context" routine INTEGER*8 LIBICB$PH_UO_WRITE_MEM ! Pointer to user "put memory" routine INTEGER*8 LIBICB$PH_UO_WRITE_REG ! Pointer to user "put register" routine INTEGER*8 LIBICB$PH_UO_MALLOC ! Pointer to user "malloc" routine INTEGER*8 LIBICB$PH_UO_FREE ! Pointer to user "free" routine INTEGER*8 LIBICB$PH_UO_ACTION_ROUTINE ! Pointer to user "action" routine - actions ! are defined by "action codes" (see below). INTEGER*8 LIBICB$ih_spare_10 ! the following locations are used internally, and should not be ! modified by the user INTEGER*8 LIBICB$ph_most_recent_context ! Most recent user context used UNION MAP INTEGER*4 LIBICB$l_internal_flags ! internal operational flags END MAP MAP PARAMETER LIBICB$S_using_client_memread = 1 PARAMETER LIBICB$V_using_client_memread = 0 PARAMETER LIBICB$S_my_mode = 2 PARAMETER LIBICB$V_my_mode = 1 BYTE %FILL (1) END MAP END UNION INTEGER*4 LIBICB$l_interface_state ! enum InterfaceUsageState INTEGER*4 LIBICB$l_ip_source ! enum IP_SOURCE ! The alert code can be examined to a more detailed failure status INTEGER*4 LIBICB$L_ALERT_CODE ! enum _UNW_ReturnCode INTEGER*8 LIBICB$ih_spare_11 ! unsupported type CHARACTER*0 %FILL ! the operating system. It's size may vary over time. INTEGER*8 LIBICB$IH_SYSTEM_DEFINED(0:1) ! ! Action codes are passed as the first parameter to the UO_ACTION_ROUTINE to indicate ! an action to be performed. The remaining parameters to the action routine are action ! dependent, and usually include the ident value as the last parameter. ! ! Action routine prototype: ! ! uint64 return_value = action_routine (enum action_code code, ..., uint64 ident); ! ! A return_value of ACTION_USE_DEFAULT indicates that the action was not performed ! and the calling standard routines should fall back to "default" processing. ! Other return values are action dependent. ! END STRUCTURE ! INVO_CONTEXT_BLK ! Write Register callback routine - WhichReg enum. ! ! The Write Register callback routine is only used when a live ! register in another (remote) process needs to be written as ! a result of a call to LIB$I64_PUT_INVO_REGISTERS. ! It is permissible to implement a subset of these registers, ! or not implement it at all if you are sure that these registers ! have been saved to memory before PUT_INVO is called ! ! For the General Registers: ! whichReg = LIBICB$K_WhichReg_GR0 + register number ! value_1 = 64-bit register value ! value_2 = 0, or 1 for NaT bit value ! PARAMETER LIBICB$K_WhichReg_GR0 = '00000000'X ! ! For the Floating Registers: ! whichReg = LIBICB$K_WhichReg_FR0 + floating register number ! value_1 = 64-bit lower floating fill value ! value_2 = 64-bit upper floating fill value ! PARAMETER LIBICB$K_WhichReg_FR0 = '00000080'X ! ! For the Predicate Registers: ! whichReg = LIBICB$K_WhichReg_PR0 + predicate register number ! value_1 = 0, or 1 rgister (bit) value ! value_2 = ignored ! PARAMETER LIBICB$K_WhichReg_PR0 = '00000100'X ! ! For the Branch Registers: ! whichReg = LIBICB$K_WhichReg_BR0 + branch register number ! value_1 = 64-bit register value ! value_2 = ignored ! PARAMETER LIBICB$K_WhichReg_BR0 = '00000140'X ! ! For the Floating Point Status Register: ! whichReg = LIBICB$K_WhichReg_FPSR ! value_1 = 64-bit register value ! value_2 = ignored ! PARAMETER LIBICB$K_WhichReg_FPSR = '00000148'X !DEC$ END OPTIONS