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

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