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

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