From patchwork Fri Jul 11 02:48:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Bronson X-Patchwork-Id: 2004 Received: (qmail 23596 invoked by alias); 11 Jul 2014 03:00:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 23280 invoked by uid 89); 11 Jul 2014 03:00:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f170.google.com Received: from mail-qc0-f170.google.com (HELO mail-qc0-f170.google.com) (209.85.216.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 11 Jul 2014 02:59:52 +0000 Received: by mail-qc0-f170.google.com with SMTP id c9so475060qcz.1 for ; Thu, 10 Jul 2014 19:59:50 -0700 (PDT) X-Received: by 10.140.23.198 with SMTP id 64mr82929320qgp.84.1405047590185; Thu, 10 Jul 2014 19:59:50 -0700 (PDT) Received: from hydrogen (naesten-pt.tunnel.tserv4.nyc4.ipv6.he.net. [2001:470:1f06:57::2]) by mx.google.com with ESMTPSA id g4sm1961594qay.6.2014.07.10.19.59.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 10 Jul 2014 19:59:48 -0700 (PDT) Received: from naesten by hydrogen with local (Exim 4.82) (envelope-from ) id 1X5R3q-00006b-Pa; Thu, 10 Jul 2014 22:59:46 -0400 From: Samuel Bronson To: libstdc++@gcc.gnu.org, GCC Patches Cc: Samuel Bronson , Jonathan Wakely , GDB Patches , Tom Tromey Subject: [PATCH v2 2/3] libstdc++ testsuite: Turn off GDB's auto-load, list loaded libs Date: Thu, 10 Jul 2014 22:48:18 -0400 Message-Id: <1405046899-32639-3-git-send-email-naesten@gmail.com> In-Reply-To: <1405046899-32639-1-git-send-email-naesten@gmail.com> References: <1400701554-18062-1-git-send-email-naesten@gmail.com> <1405046899-32639-1-git-send-email-naesten@gmail.com> MIME-Version: 1.0 X-IsSubscribed: yes 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 --- 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