#!/bin/sh global verbose := 'false' if test $1 = "-v" { global verbose := 'true' shift } global build_plat := 'x86' global plat := 'x86' global os := 'linux-gnu' global num_errors := '0' global LIBUNWIND := '../src/.libs/libunwind.so' global LIBUNWIND_GENERIC := "../src/.libs/libunwind-$(plat).so" proc fetch_symtab { global filename := $1 if test ! -r $filename { return } if $verbose { echo "Checking $filename..." } # # Unfortunately, "nm --defined" is a GNU-extension. For portability, # build the list of defined symbols by hand. # global symtab := $[nm -g $filename] global saved_IFS := $IFS global IFS := ''"" global undef := $[nm -g -u $filename] for line in [$undef] { global symtab := $[echo $symtab | grep -v "^$(line)"'$'] }; global IFS := $saved_IFS } proc ignore { global sym := $1 global symtab := $[echo $symtab | grep -v " $(sym)] } proc match { global sym := $1 if $[echo $symtab | grep -q " $(sym)] { global symtab := $[echo $symtab | grep -v " $(sym)] } else { echo " ERROR: Symbol \"$sym\" missing." global num_errors := $[expr $num_errors + 1] } } # # Filter out miscellaneous symbols that get defined by the # linker for each shared object. # proc filter_misc { ignore _DYNAMIC ignore _GLOBAL_OFFSET_TABLE_ ignore __bss_start ignore _edata ignore _end ignore _Uelf32_get_proc_name ignore _Uelf32_valid_object ignore _Uelf64_get_proc_name ignore _Uelf64_valid_object ignore _U.*debug_level ignore ICRT.INTERNAL # ICC 8.x defines this } proc check_local_unw_abi { match _UL$(plat)_create_addr_space match _UL$(plat)_destroy_addr_space match _UL$(plat)_get_fpreg match _UL$(plat)_get_proc_info match _UL$(plat)_get_proc_info_by_ip match _UL$(plat)_get_proc_name match _UL$(plat)_get_reg match _UL$(plat)_get_save_loc match _UL$(plat)_init_local match _UL$(plat)_init_remote match _UL$(plat)_is_signal_frame match _UL$(plat)_handle_signal_frame match _UL$(plat)_local_addr_space match _UL$(plat)_resume match _UL$(plat)_set_caching_policy match _UL$(plat)_set_reg match _UL$(plat)_set_fpreg match _UL$(plat)_step match _U$(plat)_flush_cache match _U$(plat)_get_accessors match _U$(plat)_getcontext match _U$(plat)_regname match _U$(plat)_strerror match _U_dyn_cancel match _U_dyn_info_list_addr match _U_dyn_register match unw_backtrace match backtrace matchstr $(plat) { hppa { match _UL$(plat)_dwarf_search_unwind_table match _U$(plat)_get_elf_image match _U$(plat)_setcontext } ia64 { match _UL$(plat)_search_unwind_table match _U$(plat)_get_elf_image } x86 { match _U$(plat)_get_elf_image match _U$(plat)_is_fpreg match _UL$(plat)_dwarf_search_unwind_table } x86_64 { match _U$(plat)_get_elf_image match _U$(plat)_is_fpreg match _UL$(plat)_dwarf_search_unwind_table match _U$(plat)_setcontext } * { match _U$(plat)_is_fpreg match _UL$(plat)_dwarf_search_unwind_table } } if test xno = xyes { match _UL$(plat)_dwarf_find_debug_frame } } proc check_generic_unw_abi { match _U$(plat)_create_addr_space match _U$(plat)_destroy_addr_space match _U$(plat)_flush_cache match _U$(plat)_get_accessors match _U$(plat)_get_fpreg match _U$(plat)_get_proc_info match _U$(plat)_get_proc_info_by_ip match _U$(plat)_get_proc_name match _U$(plat)_get_reg match _U$(plat)_get_save_loc match _U$(plat)_init_local match _U$(plat)_init_remote match _U$(plat)_is_signal_frame match _U$(plat)_handle_signal_frame match _U$(plat)_local_addr_space match _U$(plat)_regname match _U$(plat)_resume match _U$(plat)_set_caching_policy match _U$(plat)_set_fpreg match _U$(plat)_set_reg match _U$(plat)_step match _U$(plat)_strerror matchstr $(plat) { hppa { match _U$(plat)_dwarf_search_unwind_table match _U$(plat)_get_elf_image } ia64 { match _U$(plat)_search_unwind_table match _U$(plat)_find_dyn_list if test $plat = $build_plat { match _U$(plat)_get_elf_image matchstr $os { linux* { match _U$(plat)_get_kernel_table } } } } x86 { match _U$(plat)_get_elf_image match _U$(plat)_is_fpreg match _U$(plat)_dwarf_search_unwind_table } x86_64 { match _U$(plat)_get_elf_image match _U$(plat)_is_fpreg match _U$(plat)_dwarf_search_unwind_table } * { match _U$(plat)_is_fpreg match _U$(plat)_dwarf_search_unwind_table } } if test xno = xyes { match _U$(plat)_dwarf_find_debug_frame } } proc check_cxx_abi { match _Unwind_Backtrace match _Unwind_DeleteException match _Unwind_FindEnclosingFunction match _Unwind_ForcedUnwind match _Unwind_GetBSP match _Unwind_GetCFA match _Unwind_GetDataRelBase match _Unwind_GetGR match _Unwind_GetIP match _Unwind_GetIPInfo match _Unwind_GetLanguageSpecificData match _Unwind_GetRegionStart match _Unwind_GetTextRelBase match _Unwind_RaiseException match _Unwind_Resume match _Unwind_Resume_or_Rethrow match _Unwind_SetGR match _Unwind_SetIP match __libunwind_Unwind_Backtrace match __libunwind_Unwind_DeleteException match __libunwind_Unwind_FindEnclosingFunction match __libunwind_Unwind_ForcedUnwind match __libunwind_Unwind_GetBSP match __libunwind_Unwind_GetCFA match __libunwind_Unwind_GetDataRelBase match __libunwind_Unwind_GetGR match __libunwind_Unwind_GetIP match __libunwind_Unwind_GetIPInfo match __libunwind_Unwind_GetLanguageSpecificData match __libunwind_Unwind_GetRegionStart match __libunwind_Unwind_GetTextRelBase match __libunwind_Unwind_RaiseException match __libunwind_Unwind_Resume match __libunwind_Unwind_Resume_or_Rethrow match __libunwind_Unwind_SetGR match __libunwind_Unwind_SetIP matchstr $os { linux* { # needed only for Intel 8.0 bug-compatibility match _ReadSLEB match _ReadULEB } } } proc check_empty { if test -n $symtab { echo -e " ERROR: Extraneous symbols:\n$symtab" global num_errors := $[expr $num_errors + 1] } } if test $plat = $build_plat { fetch_symtab $LIBUNWIND filter_misc check_local_unw_abi if test xno = xyes { check_cxx_abi } check_empty } fetch_symtab $LIBUNWIND_GENERIC filter_misc check_generic_unw_abi check_empty if test $num_errors -gt 0 { echo "FAILURE: Detected $num_errors errors" exit 1 } if $verbose { echo " SUCCESS: all checks passed" } exit 0 (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:verbose) op:Equal rhs:{(false)} spids:[3])] spids: [3] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Number "$1"))} {(Lit_Other "=")} {(DQ (-v))} {(Lit_Other "]")} ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:verbose) op:Equal rhs:{(true)} spids:[26])] spids: [26] ) (C {(shift)}) ] spids: [-1 23] ) ] spids: [-1 32] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:build_plat) op:Equal rhs:{(x86)} spids:[35])] spids: [35] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:plat) op:Equal rhs:{(x86)} spids:[38])] spids: [38] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:os) op:Equal rhs:{(linux-gnu)} spids:[41])] spids: [41] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:num_errors) op:Equal rhs:{(0)} spids:[44])] spids: [44] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LIBUNWIND) op: Equal rhs: {(../src/.libs/libunwind.so)} spids: [48] ) ] spids: [48] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LIBUNWIND_GENERIC) op: Equal rhs: {(../src/.libs/libunwind-) (${ VSub_Name plat) (.so)} spids: [51] ) ] spids: [51] ) (FuncDef name: fetch_symtab body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filename) op: Equal rhs: {($ VSub_Number "$1")} spids: [67] ) ] spids: [67] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-r)} {($ VSub_Name "$filename")} {(Lit_Other "]")} ) terminator: ) ] action: [(ControlFlow token:)] spids: [-1 85] ) ] spids: [-1 91] ) (If arms: [ (if_arm cond: [(Sentence child:(C {($ VSub_Name "$verbose")}) terminator:)] action: [(C {(echo)} {(DQ ("Checking ") ($ VSub_Name "$filename") (...))})] spids: [-1 100] ) ] spids: [-1 112] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:symtab) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(nm)} {(-g)} {($ VSub_Name "$filename")})] ) left_token: spids: [133 139] ) } spids: [132] ) ] spids: [132] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:saved_IFS) op: Equal rhs: {(DQ ($ VSub_Name "$IFS"))} spids: [142] ) ] spids: [142] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:IFS) op:Equal rhs:{(DQ )} spids:[148])] spids: [148] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:undef) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(nm)} {(-g)} {(-u)} {($ VSub_Name "$filename")})] ) left_token: spids: [154 162] ) } spids: [153] ) ] spids: [153] ) (Sentence child: (ForEach iter_name: line iter_words: [{($ VSub_Name "$undef")}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:symtab) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name "$symtab"))}) (C {(grep)} {(-v)} {(DQ ("^") (${ VSub_Name line)) (EscapedLiteralPart token: ) } ) ] negated: False ) ] ) left_token: spids: [178 198] ) } spids: [177] ) ] spids: [177] ) ] spids: [174 201] ) spids: [170 172] ) terminator: ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IFS) op: Equal rhs: {(DQ ($ VSub_Name "$saved_IFS"))} spids: [205] ) ] spids: [205] ) ] spids: [64] ) spids: [59 63] ) (FuncDef name: ignore body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sym) op: Equal rhs: {($ VSub_Number "$1")} spids: [221] ) ] spids: [221] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:symtab) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name "$symtab"))}) (C {(grep)} {(-v)} { (DQ (" ") (${ VSub_Name sym) (EscapedLiteralPart token: ) ) } ) ] negated: False ) ] ) left_token: spids: [226 246] ) } spids: [225] ) ] spids: [225] ) ] spids: [218] ) spids: [213 217] ) (FuncDef name: match body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sym) op: Equal rhs: {($ VSub_Number "$1")} spids: [259] ) ] spids: [259] ) (If arms: [ (if_arm cond: [ (Sentence child: (C { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name "$symtab"))}) (C {(grep)} {(-q)} { (DQ (" ") (${ VSub_Name sym) (EscapedLiteralPart token: ) ) } ) ] negated: False ) ] ) left_token: spids: [265 285] ) } ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:symtab) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name "$symtab"))}) (C {(grep)} {(-v)} { (DQ (" ") (${ VSub_Name sym) (EscapedLiteralPart token: ) ) } ) ] negated: False ) ] ) left_token: spids: [292 312] ) } spids: [291] ) ] spids: [291] ) ] spids: [-1 288] ) ] else_action: [ (C {(echo)} { (DQ (" ERROR: Symbol ") (EscapedLiteralPart token:) ($ VSub_Name "$sym") (EscapedLiteralPart token:) (" missing.") ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:num_errors) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Name "$num_errors")} {(Lit_Other "+")} {(1)}) ] ) left_token: spids: [330 338] ) } spids: [329] ) ] spids: [329] ) ] spids: [315 341] ) ] spids: [256] ) spids: [251 255] ) (FuncDef name: filter_misc body: (BraceGroup children: [ (C {(ignore)} {(_DYNAMIC)}) (C {(ignore)} {(_GLOBAL_OFFSET_TABLE_)}) (C {(ignore)} {(__bss_start)}) (C {(ignore)} {(_edata)}) (C {(ignore)} {(_end)}) (C {(ignore)} {(_Uelf32_get_proc_name)}) (C {(ignore)} {(_Uelf32_valid_object)}) (C {(ignore)} {(_Uelf64_get_proc_name)}) (C {(ignore)} {(_Uelf64_valid_object)}) (C {(ignore)} {(_U.) (Lit_Other "*") (debug_level)}) (C {(ignore)} {(ICRT.INTERNAL)}) ] spids: [363] ) spids: [358 362] ) (FuncDef name: check_local_unw_abi body: (BraceGroup children: [ (C {(match)} {(_UL) (${ VSub_Name plat) (_create_addr_space)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_destroy_addr_space)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_get_fpreg)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_get_proc_info)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_get_proc_info_by_ip)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_get_proc_name)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_get_reg)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_get_save_loc)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_init_local)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_init_remote)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_is_signal_frame)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_handle_signal_frame)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_local_addr_space)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_resume)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_set_caching_policy)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_set_reg)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_set_fpreg)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_step)}) (C {(match)} {(_U) (${ VSub_Name plat) (_flush_cache)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_accessors)}) (C {(match)} {(_U) (${ VSub_Name plat) (_getcontext)}) (C {(match)} {(_U) (${ VSub_Name plat) (_regname)}) (C {(match)} {(_U) (${ VSub_Name plat) (_strerror)}) (C {(match)} {(_U_dyn_cancel)}) (C {(match)} {(_U_dyn_info_list_addr)}) (C {(match)} {(_U_dyn_register)}) (C {(match)} {(unw_backtrace)}) (C {(match)} {(backtrace)}) (Case to_match: {(${ VSub_Name plat)} arms: [ (case_arm pat_list: [{(hppa)}] action: [ (C {(match)} {(_UL) (${ VSub_Name plat) (_dwarf_search_unwind_table)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_elf_image)}) (C {(match)} {(_U) (${ VSub_Name plat) (_setcontext)}) ] spids: [681 682 712 -1] ) (case_arm pat_list: [{(ia64)}] action: [ (C {(match)} {(_UL) (${ VSub_Name plat) (_search_unwind_table)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_elf_image)}) ] spids: [715 716 737 -1] ) (case_arm pat_list: [{(x86)}] action: [ (C {(match)} {(_U) (${ VSub_Name plat) (_get_elf_image)}) (C {(match)} {(_U) (${ VSub_Name plat) (_is_fpreg)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_dwarf_search_unwind_table)}) ] spids: [740 741 771 -1] ) (case_arm pat_list: [{(x86_64)}] action: [ (C {(match)} {(_U) (${ VSub_Name plat) (_get_elf_image)}) (C {(match)} {(_U) (${ VSub_Name plat) (_is_fpreg)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_dwarf_search_unwind_table)}) (C {(match)} {(_U) (${ VSub_Name plat) (_setcontext)}) ] spids: [774 775 814 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (C {(match)} {(_U) (${ VSub_Name plat) (_is_fpreg)}) (C {(match)} {(_UL) (${ VSub_Name plat) (_dwarf_search_unwind_table)}) ] spids: [817 818 839 -1] ) ] spids: [672 678 842] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(xno)} {(Lit_Other "=")} {(xyes)} {(Lit_Other "]")}) terminator: ) ] action: [(C {(match)} {(_UL) (${ VSub_Name plat) (_dwarf_find_debug_frame)})] spids: [-1 859] ) ] spids: [-1 871] ) ] spids: [433] ) spids: [428 432] ) (FuncDef name: check_generic_unw_abi body: (BraceGroup children: [ (C {(match)} {(_U) (${ VSub_Name plat) (_create_addr_space)}) (C {(match)} {(_U) (${ VSub_Name plat) (_destroy_addr_space)}) (C {(match)} {(_U) (${ VSub_Name plat) (_flush_cache)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_accessors)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_fpreg)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_proc_info)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_proc_info_by_ip)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_proc_name)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_reg)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_save_loc)}) (C {(match)} {(_U) (${ VSub_Name plat) (_init_local)}) (C {(match)} {(_U) (${ VSub_Name plat) (_init_remote)}) (C {(match)} {(_U) (${ VSub_Name plat) (_is_signal_frame)}) (C {(match)} {(_U) (${ VSub_Name plat) (_handle_signal_frame)}) (C {(match)} {(_U) (${ VSub_Name plat) (_local_addr_space)}) (C {(match)} {(_U) (${ VSub_Name plat) (_regname)}) (C {(match)} {(_U) (${ VSub_Name plat) (_resume)}) (C {(match)} {(_U) (${ VSub_Name plat) (_set_caching_policy)}) (C {(match)} {(_U) (${ VSub_Name plat) (_set_fpreg)}) (C {(match)} {(_U) (${ VSub_Name plat) (_set_reg)}) (C {(match)} {(_U) (${ VSub_Name plat) (_step)}) (C {(match)} {(_U) (${ VSub_Name plat) (_strerror)}) (Case to_match: {(${ VSub_Name plat)} arms: [ (case_arm pat_list: [{(hppa)}] action: [ (C {(match)} {(_U) (${ VSub_Name plat) (_dwarf_search_unwind_table)}) (C {(match)} {(_U) (${ VSub_Name plat) (_get_elf_image)}) ] spids: [1093 1094 1115 -1] ) (case_arm pat_list: [{(ia64)}] action: [ (C {(match)} {(_U) (${ VSub_Name plat) (_search_unwind_table)}) (C {(match)} {(_U) (${ VSub_Name plat) (_find_dyn_list)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$plat")} {(Lit_Other "=")} {($ VSub_Name "$build_plat")} {(Lit_Other "]")} ) terminator: ) ] action: [ (C {(match)} {(_U) (${ VSub_Name plat) (_get_elf_image)}) (Case to_match: {($ VSub_Name "$os")} arms: [ (case_arm pat_list: [{(linux) (Lit_Other "*")}] action: [(C {(match)} {(_U) (${ VSub_Name plat) (_get_kernel_table)})] spids: [1172 1174 1186 -1] ) ] spids: [1165 1169 1189] ) ] spids: [-1 1153] ) ] spids: [-1 1192] ) ] spids: [1118 1119 1195 -1] ) (case_arm pat_list: [{(x86)}] action: [ (C {(match)} {(_U) (${ VSub_Name plat) (_get_elf_image)}) (C {(match)} {(_U) (${ VSub_Name plat) (_is_fpreg)}) (C {(match)} {(_U) (${ VSub_Name plat) (_dwarf_search_unwind_table)}) ] spids: [1198 1199 1229 -1] ) (case_arm pat_list: [{(x86_64)}] action: [ (C {(match)} {(_U) (${ VSub_Name plat) (_get_elf_image)}) (C {(match)} {(_U) (${ VSub_Name plat) (_is_fpreg)}) (C {(match)} {(_U) (${ VSub_Name plat) (_dwarf_search_unwind_table)}) ] spids: [1232 1233 1263 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (C {(match)} {(_U) (${ VSub_Name plat) (_is_fpreg)}) (C {(match)} {(_U) (${ VSub_Name plat) (_dwarf_search_unwind_table)}) ] spids: [1266 1267 1288 -1] ) ] spids: [1084 1090 1291] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(xno)} {(Lit_Other "=")} {(xyes)} {(Lit_Other "]")}) terminator: ) ] action: [(C {(match)} {(_U) (${ VSub_Name plat) (_dwarf_find_debug_frame)})] spids: [-1 1308] ) ] spids: [-1 1320] ) ] spids: [882] ) spids: [877 881] ) (FuncDef name: check_cxx_abi body: (BraceGroup children: [ (C {(match)} {(_Unwind_Backtrace)}) (C {(match)} {(_Unwind_DeleteException)}) (C {(match)} {(_Unwind_FindEnclosingFunction)}) (C {(match)} {(_Unwind_ForcedUnwind)}) (C {(match)} {(_Unwind_GetBSP)}) (C {(match)} {(_Unwind_GetCFA)}) (C {(match)} {(_Unwind_GetDataRelBase)}) (C {(match)} {(_Unwind_GetGR)}) (C {(match)} {(_Unwind_GetIP)}) (C {(match)} {(_Unwind_GetIPInfo)}) (C {(match)} {(_Unwind_GetLanguageSpecificData)}) (C {(match)} {(_Unwind_GetRegionStart)}) (C {(match)} {(_Unwind_GetTextRelBase)}) (C {(match)} {(_Unwind_RaiseException)}) (C {(match)} {(_Unwind_Resume)}) (C {(match)} {(_Unwind_Resume_or_Rethrow)}) (C {(match)} {(_Unwind_SetGR)}) (C {(match)} {(_Unwind_SetIP)}) (C {(match)} {(__libunwind_Unwind_Backtrace)}) (C {(match)} {(__libunwind_Unwind_DeleteException)}) (C {(match)} {(__libunwind_Unwind_FindEnclosingFunction)}) (C {(match)} {(__libunwind_Unwind_ForcedUnwind)}) (C {(match)} {(__libunwind_Unwind_GetBSP)}) (C {(match)} {(__libunwind_Unwind_GetCFA)}) (C {(match)} {(__libunwind_Unwind_GetDataRelBase)}) (C {(match)} {(__libunwind_Unwind_GetGR)}) (C {(match)} {(__libunwind_Unwind_GetIP)}) (C {(match)} {(__libunwind_Unwind_GetIPInfo)}) (C {(match)} {(__libunwind_Unwind_GetLanguageSpecificData)}) (C {(match)} {(__libunwind_Unwind_GetRegionStart)}) (C {(match)} {(__libunwind_Unwind_GetTextRelBase)}) (C {(match)} {(__libunwind_Unwind_RaiseException)}) (C {(match)} {(__libunwind_Unwind_Resume)}) (C {(match)} {(__libunwind_Unwind_Resume_or_Rethrow)}) (C {(match)} {(__libunwind_Unwind_SetGR)}) (C {(match)} {(__libunwind_Unwind_SetIP)}) (Case to_match: {($ VSub_Name "$os")} arms: [ (case_arm pat_list: [{(linux) (Lit_Other "*")}] action: [(C {(match)} {(_ReadSLEB)}) (C {(match)} {(_ReadULEB)})] spids: [1520 1522 1539 -1] ) ] spids: [1513 1517 1542] ) ] spids: [1330] ) spids: [1325 1329] ) (FuncDef name: check_empty body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$symtab"))} {(Lit_Other "]")}) terminator: ) ] action: [ (C {(echo)} {(-e)} { (DQ (" ERROR: Extraneous symbols:") (EscapedLiteralPart token:) ($ VSub_Name "$symtab") ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:num_errors) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Name "$num_errors")} {(Lit_Other "+")} {(1)}) ] ) left_token: spids: [1583 1591] ) } spids: [1582] ) ] spids: [1582] ) ] spids: [-1 1568] ) ] spids: [-1 1594] ) ] spids: [1552] ) spids: [1547 1551] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$plat")} {(Lit_Other "=")} {($ VSub_Name "$build_plat")} {(Lit_Other "]")} ) terminator: ) ] action: [ (C {(fetch_symtab)} {($ VSub_Name "$LIBUNWIND")}) (C {(filter_misc)}) (C {(check_local_unw_abi)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(xno)} {(Lit_Other "=")} {(xyes)} {(Lit_Other "]")}) terminator: ) ] action: [(C {(check_cxx_abi)})] spids: [-1 1639] ) ] spids: [-1 1645] ) (C {(check_empty)}) ] spids: [-1 1612] ) ] spids: [-1 1650] ) (C {(fetch_symtab)} {($ VSub_Name "$LIBUNWIND_GENERIC")}) (C {(filter_misc)}) (C {(check_generic_unw_abi)}) (C {(check_empty)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$num_errors")} {(-gt)} {(0)} {(Lit_Other "]")}) terminator: ) ] action: [ (C {(echo)} {(DQ ("FAILURE: Detected ") ($ VSub_Name "$num_errors") (" errors"))}) (C {(exit)} {(1)}) ] spids: [-1 1677] ) ] spids: [-1 1693] ) (If arms: [ (if_arm cond: [(Sentence child:(C {($ VSub_Name "$verbose")}) terminator:)] action: [(C {(echo)} {(DQ (" SUCCESS: all checks passed"))})] spids: [-1 1701] ) ] spids: [-1 1710] ) (C {(exit)} {(0)}) ] )