this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixes for build on Arch (#157)

+22 -15
+7 -3
src/libunwind/src/DwarfInstructions.hpp
··· 29 29 #ifndef __DWARF_INSTRUCTIONS_HPP__ 30 30 #define __DWARF_INSTRUCTIONS_HPP__ 31 31 32 + #include <assert.h> 32 33 #include <stdint.h> 33 34 #include <stdio.h> 34 35 #include <stdlib.h> ··· 917 918 template <typename A, typename R> 918 919 int DwarfInstructions<A,R>::lastRestoreReg(const Registers_x86_64&) 919 920 { 920 - COMPILE_TIME_ASSERT( (int)CFI_Parser<A>::kMaxRegisterNumber > (int)DW_X86_64_RET_ADDR ); 921 + static_assert( (int)CFI_Parser<A>::kMaxRegisterNumber > (int)DW_X86_64_RET_ADDR, 922 + "(int)CFI_Parser<A>::kMaxRegisterNumber MUST be > (int)DW_X86_64_RET_ADDR" ); 921 923 return DW_X86_64_RET_ADDR; 922 924 } 923 925 ··· 1312 1314 template <typename A, typename R> 1313 1315 int DwarfInstructions<A,R>::lastRestoreReg(const Registers_x86&) 1314 1316 { 1315 - COMPILE_TIME_ASSERT( (int)CFI_Parser<A>::kMaxRegisterNumber > (int)DW_X86_RET_ADDR ); 1317 + static_assert( (int)CFI_Parser<A>::kMaxRegisterNumber > (int)DW_X86_RET_ADDR, 1318 + "(int)CFI_Parser<A>::kMaxRegisterNumber MUST be > (int)DW_X86_RET_ADDR" ); 1316 1319 return DW_X86_RET_ADDR; 1317 1320 } 1318 1321 ··· 1688 1691 template <typename A, typename R> 1689 1692 int DwarfInstructions<A,R>::lastRestoreReg(const Registers_ppc&) 1690 1693 { 1691 - COMPILE_TIME_ASSERT( (int)CFI_Parser<A>::kMaxRegisterNumber > (int)UNW_PPC_SPEFSCR ); 1694 + static_assert( (int)CFI_Parser<A>::kMaxRegisterNumber > (int)UNW_PPC_SPEFSCR, 1695 + "(int)CFI_Parser<A>::kMaxRegisterNumber MUST be > (int)UNW_PPC_SPEFSCR" ); 1692 1696 return UNW_PPC_SPEFSCR; 1693 1697 } 1694 1698
+5 -8
src/libunwind/src/InternalMacros.h
··· 21 21 * 22 22 * @APPLE_LICENSE_HEADER_END@ 23 23 */ 24 - 24 + 25 25 26 26 27 27 #ifndef INTERNAL_MACROS_H ··· 45 45 struct v128 { unsigned int vec[4]; }; 46 46 47 47 48 - #define EXPORT __attribute__((visibility("default"))) 48 + #define EXPORT __attribute__((visibility("default"))) 49 49 50 - #define COMPILE_TIME_ASSERT( expr ) \ 51 - extern int compile_time_assert_failed[ ( expr ) ? 1 : -1 ] __attribute__( ( unused ) ); 52 - 53 - #define ABORT(msg) __assert_rtn(__func__, __FILE__, __LINE__, msg) 50 + #define ABORT(msg) __assert_rtn(__func__, __FILE__, __LINE__, msg) 54 51 55 52 #if NDEBUG 56 - #define DEBUG_MESSAGE(msg, ...) 53 + #define DEBUG_MESSAGE(msg, ...) 57 54 #define DEBUG_PRINT_API(msg, ...) 58 55 #define DEBUG_PRINT_UNWINDING_TEST 0 59 56 #define DEBUG_PRINT_UNWINDING(msg, ...) ··· 93 90 94 91 #define NOT_HERE_BEFORE_10_6(sym) \ 95 92 extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \ 96 - extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); __attribute__((visibility("default"))) const char sym##_tmp5 = 0; 93 + extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); __attribute__((visibility("default"))) const char sym##_tmp5 = 0; 97 94 #define NEVER_HERE(sym) \ 98 95 extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \ 99 96 extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); __attribute__((visibility("default"))) const char sym##_tmp5 = 0; \
+7 -3
src/libunwind/src/Registers.hpp
··· 29 29 #ifndef __REGISTERS_HPP__ 30 30 #define __REGISTERS_HPP__ 31 31 32 + #include <assert.h> 32 33 #include <stdint.h> 33 34 #include <stdio.h> 34 35 #include <stdlib.h> ··· 106 107 107 108 inline Registers_x86::Registers_x86(const void* registers) 108 109 { 109 - COMPILE_TIME_ASSERT( sizeof(Registers_x86) < sizeof(unw_context_t) ); 110 + static_assert( sizeof(Registers_x86) < sizeof(unw_context_t), 111 + "sizeof(Registers_x86) MUST be < sizeof(unw_context_t)" ); 110 112 fRegisters = *((GPRs*)registers); 111 113 } 112 114 ··· 310 312 311 313 inline Registers_x86_64::Registers_x86_64(const void* registers) 312 314 { 313 - COMPILE_TIME_ASSERT( sizeof(Registers_x86_64) < sizeof(unw_context_t) ); 315 + static_assert( sizeof(Registers_x86_64) < sizeof(unw_context_t), 316 + "sizeof(Registers_x86_64) MUST be < sizeof(unw_context_t)" ); 314 317 fRegisters = *((GPRs*)registers); 315 318 } 316 319 ··· 588 591 589 592 inline Registers_ppc::Registers_ppc(const void* registers) 590 593 { 591 - COMPILE_TIME_ASSERT( sizeof(Registers_ppc) < sizeof(unw_context_t) ); 594 + static_assert( sizeof(Registers_ppc) < sizeof(unw_context_t) , 595 + "sizeof(Registers_ppc) MUST be < sizeof(unw_context_t)"); 592 596 fRegisters = *((ppc_thread_state_t*)registers); 593 597 fFloatRegisters = *((ppc_float_state_t*)((char*)registers+160)); 594 598 memcpy(fVectorRegisters, ((char*)registers+424), sizeof(fVectorRegisters));
+3 -1
src/libunwind/src/UnwindCursor.hpp
··· 29 29 #ifndef __UNWINDCURSOR_HPP__ 30 30 #define __UNWINDCURSOR_HPP__ 31 31 32 + #include <assert.h> 32 33 #include <stdint.h> 33 34 #include <stdio.h> 34 35 #include <stdlib.h> ··· 412 413 UnwindCursor<A,R>::UnwindCursor(unw_context_t* context, A& as) 413 414 : fRegisters(context), fAddressSpace(as), fUnwindInfoMissing(false), fIsSignalFrame(false) 414 415 { 415 - COMPILE_TIME_ASSERT( sizeof(UnwindCursor<A,R>) < sizeof(unw_cursor_t) ); 416 + static_assert( sizeof(UnwindCursor<A,R>) < sizeof(unw_cursor_t), 417 + "sizeof(UnwindCursor<A,R>) MUST be < sizeof(unw_cursor_t)" ); 416 418 417 419 bzero(&fInfo, sizeof(fInfo)); 418 420 }