Skip to content

Commit

Permalink
Libunwind 1.5rc2 again (#36988)
Browse files Browse the repository at this point in the history
* Add arm64 support for UNWIND_CONTEXT_IS_UCONTEXT_T==0

* Reapply libunwind 1.5rc2

* Fix Linux Alpine libunwind1.5rc2
  • Loading branch information
sdmaclea authored Jun 1, 2020
1 parent 660d321 commit 581dc19
Show file tree
Hide file tree
Showing 125 changed files with 4,076 additions and 528 deletions.
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)
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

0 comments on commit 581dc19

Please sign in to comment.