public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Samuel Bronson <naesten@gmail.com>
To: libstdc++@gcc.gnu.org,	GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Samuel Bronson <naesten@gmail.com>,
	Jonathan Wakely <jwakely@redhat.com>,
	GDB Patches <gdb-patches@sourceware.org>,
	Tom Tromey <tromey@redhat.com>
Subject: [PATCH v2 2/3] libstdc++ testsuite: Turn off GDB's auto-load, list loaded libs
Date: Fri, 11 Jul 2014 03:00:00 -0000	[thread overview]
Message-ID: <1405046899-32639-3-git-send-email-naesten@gmail.com> (raw)
In-Reply-To: <1405046899-32639-1-git-send-email-naesten@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]


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(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2-0002-libstdc-testsuite-Turn-off-GDB-s-auto-load-list-l.patch --]
[-- Type: text/x-patch; name="v2-0002-libstdc-testsuite-Turn-off-GDB-s-auto-load-list-l.patch", Size: 1359 bytes --]

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

  parent reply	other threads:[~2014-07-11  3:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1400701554-18062-1-git-send-email-naesten@gmail.com>
2014-07-11  2:48 ` [PATCH v2 0/3] Port libstdc++ pretty printers to Python 3 Samuel Bronson
2014-07-11  2:49   ` [PATCH v2 1/3] Make libstdc++ testsuite work with pre-color GCC versions again Samuel Bronson
2014-07-11 15:33     ` Jonathan Wakely
2014-07-11  3:00   ` Samuel Bronson [this message]
2014-07-11 15:33     ` [PATCH v2 2/3] libstdc++ testsuite: Turn off GDB's auto-load, list loaded libs Jonathan Wakely
2014-07-11  3:22   ` [PATCH v2 3/3] Port libstdc++ pretty-printers to Python 2 + Python 3 Samuel Bronson
2014-07-11  3:45     ` [PATCH v3 " Samuel Bronson
2014-07-11 13:49       ` Jonathan Wakely
2014-07-21 17:06       ` Tom Tromey
2014-07-26  6:33         ` Samuel Bronson
2014-07-30 14:20           ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405046899-32639-3-git-send-email-naesten@gmail.com \
    --to=naesten@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).