[patch]: Dump of .pdata/.xdata for x64 coff

Kai Tietz ktietz70@googlemail.com
Sun Apr 19 09:52:00 GMT 2009


Hello,

I reworked the patch and add some constants, helper macros, and
structures for pdata/xdata interpretation to coff/x86_64.h file. So
the code gets a bit more clear. Additional I could clarify the
unwind_info flag value 3. It has just on DWORD sized language specific
information plus the handler RVA. The handler is a FrameHandler and
the additional value seems to dependent to the version of handler. For
msvcrt it seems to be a frame pointer, for version 3 (of msvcr90) it
is a RVA into the .rdata section.

ChangeLog

2009-04-19  Kai Tietz  <kai.tietz@onevision.com>

	* coff-x86_64.c (PEI_HEADERS): Protect includes.
	(PE): Remove macro name checks.
	* pei-x86_64.c (PEI_HEADERS): Define to prevent double
	include in coff-x86_64.c of headers.
	(PDATA_ROW_SIZE): New define.
	(pex_regs): New static variable.
	(pex64_get_unwind_info): New static function.
	(pex64_get_unwind_info): Likewise.
	(pex64_get_scope_entry): Likewise.
	(pex64_xdata_print_uwd_codes): Likewise.
	(pep_get_section_by_rva): Likewise.
	(pex64_dump_xdata): Likewise.
	(pex64_bfd_print_pdata): Likewise.
	(bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
	* peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
	* libpei.h (_bfd_pex64_print_pdata): : Removed declaration.

2009-04-19  Kai Tietz  <kai.tietz@onevision.com>

	* coff/x86_64.h (__COFF_X86_64_H__): Add guard.
	(pex64_runtime_function): New structure.
	(external_pex64_runtime_function): Likewise.
	(pex64_unwind_code): Likewise.
	(external_pex64_unwind_code): Likewise.
	(pex64_unwind_info): Likewise.
	(external_pex64_unwind_info): Likewise.
	(external_pex64_scope): Likewise.
	(pex64_scope): Likewise.
	(external_pex64_scope_entry): Likewise.
	(PEX64_IS_RUNTIME_FUNCTION_CHAINED): New macro.
	(PEX64_GET_UNWINDDATA_UNIFIED_RVA): Likewise.
	(PEX64_UNWCODE_CODE): Likewise.
	(PEX64_UNWCODE_INFO): Likewise.
	(UWOP_...): Add defines for unwind code.
	(UNW_FLAG_...): Add defined for unwind info flags.
	(PEX64_SCOPE_ENTRY_SIZE): New macro.
	(PEX64_UWI_VERSION): Likewise.
	(PEX64_UWI_FLAGS): Likewise.
	(PEX64_UWI_FRAMEREG): Likewise.
	(PEX64_UWI_FRAMEOFF): Likewise.
	(PEX64_UWI_SIZEOF_UWCODE_ARRAY): Likewise.
	(PEX64_OFFSET_TO_UNWIND_CODE): Likewise.
	(PEX64_OFFSET_TO_HANDLER_RVA): Likewise.
	(PEX64_OFFSET_TO_SCOPE_COUNT): Likewise.
	(PEX64_SCOPE_ENTRY): Likewise.


Tested for x86_64-pc-mingw32 and regression test on i686-pc-cygwin.

Ok for apply?

Cheers,
Kai
-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xdata_peix64.diff
Type: text/x-patch
Size: 23603 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090419/aae08c9c/attachment.bin>


More information about the Binutils mailing list