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

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