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