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

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