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

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