Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/coreclr/src/pal/src/exception/seh-unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,22 @@ static void WinContextToUnwindContext(CONTEXT *winContext, unw_context_t *unwCon
unwContext->regs[13] = winContext->Sp;
unwContext->regs[14] = winContext->Lr;
unwContext->regs[15] = winContext->Pc;
#elif defined(HOST_ARM64)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sdmaclea, was it not required in the previous version of libunwind?

Copy link
Contributor Author

@sdmaclea sdmaclea Jun 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Between 1.3rc1 and 1.5rc2, libunwind changed the definition of unw_context_t. Therefore #if UNWIND_CONTEXT_IS_UCONTEXT_T changed from being evaluated as true to false. Now this code is used.

This is functionally identical to the code above.

static void WinContextToUnwindContext(CONTEXT *winContext, unw_context_t *unwContext)
{
#define ASSIGN_REG(reg) MCREG_##reg(unwContext->uc_mcontext) = winContext->reg;
    ASSIGN_UNWIND_REGS
#undef ASSIGN_REG
}

See lines 43 & 89 above.

unwContext->uc_mcontext.pc = winContext->Pc;
unwContext->uc_mcontext.sp = winContext->Sp;
unwContext->uc_mcontext.regs[29] = winContext->Fp;
unwContext->uc_mcontext.regs[30] = winContext->Lr;

unwContext->uc_mcontext.regs[19] = winContext->X19;
unwContext->uc_mcontext.regs[20] = winContext->X20;
unwContext->uc_mcontext.regs[21] = winContext->X21;
unwContext->uc_mcontext.regs[22] = winContext->X22;
unwContext->uc_mcontext.regs[23] = winContext->X23;
unwContext->uc_mcontext.regs[24] = winContext->X24;
unwContext->uc_mcontext.regs[25] = winContext->X25;
unwContext->uc_mcontext.regs[26] = winContext->X26;
unwContext->uc_mcontext.regs[27] = winContext->X27;
unwContext->uc_mcontext.regs[28] = winContext->X28;
#endif
}

Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/src/pal/src/libunwind/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,7 @@ tests/[GL]ia64-test-readonly
tests/[GL]ia64-test-stack
tests/ia64-test-dyn1
tests/ia64-test-sig
tests/[GL]x64-test-dwarf-expressions
tests/x64-unwind-badjmp-signal-frame
tests/*.log
tests/*.trs
16 changes: 16 additions & 0 deletions src/coreclr/src/pal/src/libunwind/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,26 @@ env:
- TARGET=mipsel-unknown-linux-gnu
# Currently experiencing build failures here
#- TARGET=powerpc64-linux-gnu

linux-s390x: &linux-s390x
os: linux
arch: s390x
env: TARGET=s390x-linux-gnu
script:
- ./autogen.sh
- ./configure
- make -j32
- ulimit -c unlimited
- make check -j32

script:
- ./autogen.sh
- ./configure --target=$TARGET --host=$HOST
- make -j32
- sudo bash -c 'echo core.%p.%p > /proc/sys/kernel/core_pattern'
- ulimit -c unlimited
- if [ $TARGET == 'x86_64-linux-gnu' ]; then make check -j32; fi

jobs:
include:
- <<: *linux-s390x
5 changes: 2 additions & 3 deletions src/coreclr/src/pal/src/libunwind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ elseif(CLR_CMAKE_HOST_ARCH_I386)
endif()

set(PKG_MAJOR "1")
set(PKG_MINOR "3")
set(PKG_EXTRA "-rc1")
set(PKG_MINOR "5")
set(PKG_EXTRA "-rc2")

configure_file(include/libunwind-common.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/libunwind-common.h)
configure_file(include/libunwind.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/libunwind.h)
configure_file(include/tdep/libunwind_i.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/tdep/libunwind_i.h)

5 changes: 5 additions & 0 deletions src/coreclr/src/pal/src/libunwind/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ endif
if ARCH_SH
include_HEADERS += include/libunwind-sh.h
endif
if ARCH_S390X
include_HEADERS += include/libunwind-s390x.h
endif

if !REMOTE_ONLY
include_HEADERS += include/libunwind.h include/unwind.h
Expand Down Expand Up @@ -84,6 +87,8 @@ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
include/tdep-ppc64/jmpbuf.h include/tdep-ppc64/libunwind_i.h \
include/tdep-sh/dwarf-config.h \
include/tdep-sh/jmpbuf.h include/tdep-sh/libunwind_i.h \
include/tdep-s390x/dwarf-config.h \
include/tdep-s390x/jmpbuf.h include/tdep-s390x/libunwind_i.h \
include/tdep/libunwind_i.h \
include/tdep/jmpbuf.h include/tdep/dwarf-config.h

Expand Down
Loading