This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v2 2/3] libstdc++ testsuite: Turn off GDB's auto-load, list loaded libs
- From: Samuel Bronson <naesten at gmail dot com>
- To: libstdc++ at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Samuel Bronson <naesten at gmail dot com>, Jonathan Wakely <jwakely at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>, Tom Tromey <tromey at redhat dot com>
- Date: Thu, 10 Jul 2014 22:48:18 -0400
- Subject: [PATCH v2 2/3] libstdc++ testsuite: Turn off GDB's auto-load, list loaded libs
- Authentication-results: sourceware.org; auth=none
- References: <1400701554-18062-1-git-send-email-naesten at gmail dot com> <1405046899-32639-1-git-send-email-naesten at gmail dot com>
We load our pretty-printers explicitly, and we shouldn't need any other
random -gdb.gdb or -gdb.py files from anywhere, so in this patch we turn
that off by running "set auto-load no".
Also, run "info share" so that the list of loaded libraries ends up in
the logs for the GDB tests.
libstdc++-v3/
* testsuite/lib/gdb-test.exp (gdb-test): Turn off GDB's auto-load, list
loaded libs
Signed-off-by: Samuel Bronson <naesten@gmail.com>
---
libstdc++-v3/testsuite/lib/gdb-test.exp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/testsuite/lib/gdb-test.exp b/libstdc++-v3/testsuite/lib/gdb-test.exp
index 1a72a44..6d7ea9d 100644
--- a/libstdc++-v3/testsuite/lib/gdb-test.exp
+++ b/libstdc++-v3/testsuite/lib/gdb-test.exp
@@ -116,10 +116,18 @@ proc gdb-test { marker {selector {}} } {
global gdb_tests
set fd [open $cmd_file "w"]
+ # We don't want the system copy of the pretty-printers loaded
+ puts $fd "set auto-load no"
+ # Now that we've disabled auto-load, it's safe to set the target file
+ puts $fd "file ./$output_file"
+ # Load & register *our* copy of the pretty-printers
puts $fd "source $pycode"
puts $fd "python register_libstdcxx_printers(None)"
+ # And start the program
puts $fd "break $line"
puts $fd "run"
+ # So we can verify that we're using the right libs ...
+ puts $fd "info share"
set count 0
foreach {var result kind} $gdb_tests {
@@ -147,8 +155,7 @@ proc gdb-test { marker {selector {}} } {
puts $fd "quit"
close $fd
- send_log "Spawning: $gdb_name -nx -nw -quiet -batch -x $cmd_file ./$output_file\n"
- set res [remote_spawn target "$gdb_name -nx -nw -quiet -batch -x $cmd_file ./$output_file"]
+ set res [remote_spawn target "$gdb_name -nx -nw -quiet -batch -x $cmd_file "]
if { $res < 0 || $res == "" } {
unsupported "$testname"
return