diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a9a0757f0f..1e48f98efe 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-04-30 Yao Qi + + * gdb.base/relativedebug.exp: Invoke gdb command + "info sharedlibrary", and if libc.so doesn't have debug info, + skip the test. + 2015-04-29 Doug Evans * gdb.python/py-xmethods.exp: Add ptype tests. diff --git a/gdb/testsuite/gdb.base/relativedebug.exp b/gdb/testsuite/gdb.base/relativedebug.exp index 621226b4d3..b42dbf90a4 100644 --- a/gdb/testsuite/gdb.base/relativedebug.exp +++ b/gdb/testsuite/gdb.base/relativedebug.exp @@ -31,6 +31,17 @@ clean_restart ${binfile} runto_main +set test "info sharedlibrary" +gdb_test_multiple $test $test { + -re ".*\(\\*\)\[^\r\n\]*/libc\.so.*$gdb_prompt $" { + # Skip the test below if libc doesn't have debug info. + unsupported "libc doesn't have debug info" + return -1 + } + -re ".*$gdb_prompt $" { + } +} + # pause () -> SIGALRM -> handler () -> abort () gdb_test "continue" "Program received signal SIGABRT.*"