From 82dd799d5243e246c30bfb5fb463d740c6cc71f4 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Fri, 5 Jun 2015 01:19:14 -0500 Subject: [PATCH] ntdll: Add partial support for version 3 of DWARF CIEs which are generated by Clang/LLVM. --- dlls/ntdll/signal_x86_64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 9c5836377a..9b98894330 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -1342,7 +1342,7 @@ static NTSTATUS dwarf_virtual_unwind( ULONG64 ip, ULONG64 *frame,CONTEXT *contex /* parse the CIE first */ - if (cie->version != 1) + if (cie->version != 1 && cie->version != 3) { FIXME( "unknown CIE version %u at %p\n", cie->version, cie ); return STATUS_INVALID_DISPOSITION; @@ -1351,7 +1351,10 @@ static NTSTATUS dwarf_virtual_unwind( ULONG64 ip, ULONG64 *frame,CONTEXT *contex info.code_align = dwarf_get_uleb128( &ptr ); info.data_align = dwarf_get_sleb128( &ptr ); - info.retaddr_reg = *ptr++; + if (cie->version == 1) + info.retaddr_reg = *ptr++; + else + info.retaddr_reg = dwarf_get_uleb128( &ptr ); info.state.cfa_rule = RULE_CFA_OFFSET; TRACE( "function %lx base %p cie %p len %x id %x version %x aug '%s' code_align %lu data_align %ld retaddr %s\n",