diff options
Diffstat (limited to 'gdb/testsuite/lib/gdb.exp')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 4f2b7c9..0b02f76 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2093,6 +2093,43 @@ proc skip_hw_watchpoint_access_tests {} { return 0 } +# Return 1 if we should skip tests that require the runtime unwinder +# hook. This must be invoked while gdb is running, after shared +# libraries have been loaded. This is needed because otherwise a +# shared libgcc won't be visible. + +proc skip_unwinder_tests {} { + global gdb_prompt + + set ok 1 + gdb_test_multiple "print _Unwind_DebugHook" "check for unwinder hook" { + -re "= .*no debug info.*_Unwind_DebugHook.*\r\n$gdb_prompt $" { + # Pass the test so we don't get bogus fails in the results. + pass "check for unwinder hook" + set ok 0 + } + -re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" { + pass "check for unwinder hook" + } + -re "No symbol .* in current context.\r\n$gdb_prompt $" { + # Pass the test so we don't get bogus fails in the results. + pass "check for unwinder hook" + set ok 0 + } + } + if {!$ok} { + gdb_test_multiple "info probe" "check for stap probe in unwinder" { + -re ".*libgcc.*unwind.*\r\n$gdb_prompt $" { + pass "check for stap probe in unwinder" + set ok 1 + } + -re "\r\n$gdb_prompt $" { + } + } + } + return $ok +} + set compiler_info "unknown" set gcc_compiled 0 set hp_cc_compiler 0 |