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

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