Share via


SH-3 pdata Format

The Microsoft Common Object File Format (COFF) specifies a pdata section that contains an array of function table entries for exception handling. The exception table entry in the image data directory points to this structure. The SH-3 Calling Sequence Specification supports a PDATA structure, _IMAGE_CE_RUNTIME_FUNCTION_ENTRY, to aid in stack walking at run-time. This structure aids in debugging and exception processing.

The following table shows the function-table entry format used for the ARM, SH-3, and SH-4 platforms.

Offset Size Field Description
0 4 Begin Address Virtual address of the corresponding function.
4 8 bits Prolog Length Number of instructions in the functions prolog.
4 22 bits Function Length Number of instructions in the function.
4 1 bit 32-bit Flag Set if the function is comprised of 32-bit instructions, cleared for a 16-bit function.
4 1 bit Exception Flag Set if an exception handler exists for the function.

In the event that the ExceptionFlag member of the PDATA structure is set, or the FuncLen member is set to zero, an additional PDATA_EH structure precedes the function in the .text section. The function uses PDATA_EH when it has an associated exception handler or handler data.

In most cases, PDATA structure occupies only eight bytes per function. For functions that have an exception handler, the PDATA_EH structure requires an additional eight bytes.

The exception-handling data record and the prolog and function length record are both guaranteed to be 4-byte aligned. This implies that any function that has or both of these records associated with it is 4-byte aligned.

See Also

SH-3 Calling Sequence Specification | SH-3 Registers | SH-3 Stack Frame Layout | SH-3 Parameter Passing | SH-3 Return Values | SH-3 Prolog and Epilog | SH-3 Assembler Macros | _IMAGE_CE_RUNTIME_FUNCTION_ENTRY

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.