PDATA Structures (Windows CE 5.0)

Windows CE 5.0
Send Feedback

ARM, MIPS, and SH Windows CE compilers use PDATA structures to aid in stack walking at run-time. This structure aids in debugging and exception processing.

The compilers associate one PDATA structure with each procedure.

The data structure is a table stored in a COFF .pdata section. The .pdata section contains an array of function table entries for exception handling, and is pointed to by the exception table entry in the image data directory.

The MIPS calling standard supports an uncompressed PDATA format, _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY. In most cases, MIPSII currently uses an uncompressed 20 bytes for each function for the _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY entry.

Leaf functions that do not have associated exception-handling routines do not have an associated pdata entry.

The following table shows the function table entry format for MIPSII images.

OffsetSizeFieldDescription
04Begin AddressVirtual address of the corresponding function.
44End AddressVirtual address of the end of the function.
84Exception HandlerPointer to the exception handler to be executed.
124Handler DataPointer to additional information to be passed to the handler.
164Prolog End AddressVirtual address of the end of the function prolog.

ARM and SH-4 Windows CE compilers support a compressed PDATA structure, _IMAGE_CE_RUNTIME_FUNCTION_ENTRY.

The following table shows the COFF-specified function-table entry format used for the ARM and SH-4 hardware platforms.

OffsetSizeFieldDescription
04Begin AddressVirtual address of the corresponding function.
48 bitsProlog LengthNumber of instructions in the function's prolog.
422 bitsFunction LengthNumber of instructions in the function.
41 bit32-bit FlagSet if the function is comprised of 32-bit instructions, cleared for a 16-bit function.
41 bitException FlagSet if an exception handler exists for the function.

If an exception handler exists or the function length is zero, an additional PDATA_EH structure precedes the function in the .text section. The function uses PDATA_EH when the function 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 guaranteed to be 4-byte aligned. This implies that any function associated with one or more of these records is 4-byte aligned.

See Also

Virtual Unwinding


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show: