Blame SOURCES/gdb-core-open-vdso-warning.patch

a8223e
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
a8223e
From: Fedora GDB patches <invalid@email.com>
a8223e
Date: Fri, 27 Oct 2017 21:07:50 +0200
a8223e
Subject: gdb-core-open-vdso-warning.patch
a8223e
a8223e
;; Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
a8223e
;; Fix regression of undisplayed missing shared libraries caused by a fix for.
a8223e
;;=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*>
a8223e
a8223e
http://sourceware.org/ml/gdb-patches/2009-10/msg00142.html
a8223e
Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map:  Input/output error.
a8223e
a8223e
[ New patch variant.  ]
a8223e
a8223e
commit 7d760051ffb8a23cdc51342d4e6243fbc462f73f
a8223e
Author: Ulrich Weigand <uweigand@de.ibm.com>
a8223e
Date:   Wed Sep 25 11:52:50 2013 +0000
a8223e
a8223e
diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp
a8223e
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
a8223e
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
a8223e
@@ -29,6 +29,7 @@ set testfile "solib-symbol-main"
a8223e
 set srcfile ${srcdir}/${subdir}/${testfile}.c
a8223e
 set binfile [standard_output_file ${testfile}]
a8223e
 set bin_flags [list debug shlib=${binfile_lib}]
a8223e
+set executable ${testfile}
a8223e
 
a8223e
 if [get_compiler_info] {
a8223e
     return -1
a8223e
@@ -71,8 +72,26 @@ gdb_test "br foo2" \
a8223e
 	 "Breakpoint.*: foo2. .2 locations..*" \
a8223e
 	 "foo2 in mdlib"
a8223e
 
a8223e
-gdb_exit
a8223e
+# Test GDB warns for shared libraris which have not been found.
a8223e
 
a8223e
-return 0
a8223e
+gdb_test "info sharedlibrary" "/${libname}.*"
a8223e
 
a8223e
+clean_restart ${executable}
a8223e
+gdb_breakpoint "main"
a8223e
+gdb_run_cmd
a8223e
+set test "no warning for missing libraries"
a8223e
+gdb_test_multiple "" $test {
a8223e
+    -re "warning: Could not load shared library symbols for \[0-9\]+ libraries,.*\r\n$gdb_prompt $" {
a8223e
+	fail $test
a8223e
+    }
a8223e
+    -re "Breakpoint \[0-9\]+, main .*\r\n$gdb_prompt $" {
a8223e
+	pass $test
a8223e
+    }
a8223e
+}
a8223e
 
a8223e
+clean_restart ${executable}
a8223e
+gdb_test_no_output "set solib-absolute-prefix /doESnotEXIST"
a8223e
+gdb_breakpoint "main"
a8223e
+gdb_run_cmd
a8223e
+gdb_test "" "warning: Could not load shared library symbols for \[0-9\]+ libraries,.*\r\nBreakpoint \[0-9\]+, main .*" \
a8223e
+	 "warning for missing libraries"