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

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