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

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