This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix solib-display.exp remote check


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=02e370d94ee3abc6f910602e79c6d4515d9c720d

commit 02e370d94ee3abc6f910602e79c6d4515d9c720d
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Wed May 4 09:27:34 2016 -0400

    Fix solib-display.exp remote check
    
    This test currently uses [is_remote target] to check if the test is
    supported.  This is not quite correct, as the limitation is actually
    that it requires support for "running", ruling out stub-like targets.
    Therefore, it should check for use_gdb_stub.
    
    This has no visible effect right now, but it will once we make the
    native-gdbserver board non-dejagnu-remote.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.base/solib-display.exp: Check for [use_gdb_stub] instead
    	of [is_remote target],

Diff:
---
 gdb/testsuite/ChangeLog                  |  5 +++++
 gdb/testsuite/gdb.base/solib-display.exp | 19 ++++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e3830b6..e1fdd38 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
 2016-05-04  Simon Marchi  <simon.marchi@ericsson.com>
 
+	* gdb.base/solib-display.exp: Check for [use_gdb_stub] instead
+	of [is_remote target],
+
+2016-05-04  Simon Marchi  <simon.marchi@ericsson.com>
+
 	* lib/gdb.exp (use_gdb_stub): New procedure.
 
 2016-05-03  Yunlian Jiang <yunlian@google.com>
diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp
index 7f65617..a82ec2e 100644
--- a/gdb/testsuite/gdb.base/solib-display.exp
+++ b/gdb/testsuite/gdb.base/solib-display.exp
@@ -28,7 +28,24 @@
 # (and thus aren't affected by shared library unloading) are not
 # disabled prematurely.
 
-if { [skip_shlib_tests] || [is_remote target] } {
+if { [skip_shlib_tests] } {
+    return 0
+}
+
+# This test is currently not supported for stub targets, because it uses the
+# start command (through gdb_start_cmd).  In theory, it could be changed to
+# use something else (kill + gdb_run_cmd with a manual breakpoint at main).
+# However, when we try that with the native-gdbserver board, we see that the
+# test fails and gdb outputs this upon connection:
+#
+#   warning: Unable to display "a_global": No symbol "a_global" in current context.
+#   warning: Unable to display "b_global": No symbol "b_global" in current context.
+#   warning: Unable to display "c_global": No symbol "c_global" in current context.
+#
+# This is because the initial stop is done before the shared libraries are
+# loaded.
+
+if { [use_gdb_stub] } {
     return 0
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]