From 48d5accb7a8b0b5195628b05e1f1dbf0c9cc4a22 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 21 Nov 2013 12:00:48 +0100 Subject: Improve dump of xdata/pdata on x86_64. bfd/ 2013-11-27 Tristan Gingold * pei-x86_64.c (pex_regs): Make it const. Add comments. (pex64_get_runtime_function): Do not split UnwindData. (pex64_get_unwind_info): Extract the chain and the handler. (pex64_xdata_print_uwd_codes): Rewritten: do not reverse print the opcode, handle version 2, add consistency check, make the code host neutral. (pex64_dump_xdata): Change arguments to pass the section and its content. Handle version 2, change output. (pex64_bfd_print_pdata): Add comments, load section for xdata. Avoid duplicate outputs. include/coff 2013-11-27 Tristan Gingold * pe.h (struct pex64_runtime_function): Remove isChained. (UWOP_SAVE_XMM): Add comment. (struct pex64_unwind_info): Remove extra fields. --- include/coff/pe.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/coff/pe.h b/include/coff/pe.h index 601a68e..3b37276 100644 --- a/include/coff/pe.h +++ b/include/coff/pe.h @@ -368,7 +368,6 @@ struct pex64_runtime_function bfd_vma rva_BeginAddress; bfd_vma rva_EndAddress; bfd_vma rva_UnwindData; - unsigned int isChained : 1; }; struct external_pex64_runtime_function @@ -393,8 +392,8 @@ struct external_pex64_runtime_function #define UWOP_SET_FPREG 3 #define UWOP_SAVE_NONVOL 4 #define UWOP_SAVE_NONVOL_FAR 5 -#define UWOP_SAVE_XMM 6 -#define UWOP_SAVE_XMM_FAR 7 +#define UWOP_SAVE_XMM 6 /* Deprecated, redefined in version 2. */ +#define UWOP_SAVE_XMM_FAR 7 /* Deprecated. */ #define UWOP_SAVE_XMM128 8 #define UWOP_SAVE_XMM128_FAR 9 #define UWOP_PUSH_MACHFRAME 10 @@ -441,14 +440,10 @@ struct pex64_unwind_info bfd_vma FrameOffset; bfd_vma sizeofUnwindCodes; bfd_byte *rawUnwindCodes; - /* Valid for UNW_FLAG_EHANDLER and UNW_FLAG_UHANDLER. */ - bfd_vma CountOfScopes; - bfd_byte *rawScopeEntries; - bfd_vma rva_ExceptionHandler; /* UNW_EHANDLER. */ - bfd_vma rva_TerminationHandler; /* UNW_FLAG_UHANDLER. */ - bfd_vma rva_FrameHandler; /* UNW_FLAG_FHANDLER. */ - bfd_vma FrameHandlerArgument; /* UNW_FLAG_FHANDLER. */ - bfd_vma rva_FunctionEntry; /* UNW_FLAG_CHAININFO. */ + bfd_vma rva_ExceptionHandler; /* UNW_EHANDLER or UNW_FLAG_UHANDLER. */ + bfd_vma rva_BeginAddress; /* UNW_FLAG_CHAININFO. */ + bfd_vma rva_EndAddress; /* UNW_FLAG_CHAININFO. */ + bfd_vma rva_UnwindData; /* UNW_FLAG_CHAININFO. */ }; struct external_pex64_unwind_info -- cgit v1.1