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

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