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

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