From patchwork Wed Sep 2 02:13:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 8552 Received: (qmail 69922 invoked by alias); 2 Sep 2015 02:13:25 -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 69908 invoked by uid 89); 2 Sep 2015 02:13:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-pa0-f74.google.com Received: from mail-pa0-f74.google.com (HELO mail-pa0-f74.google.com) (209.85.220.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 02 Sep 2015 02:13:23 +0000 Received: by pary6 with SMTP id y6so1781122par.0 for ; Tue, 01 Sep 2015 19:13:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:message-id:date:subject:from:to :content-type; bh=/9rbJ9OWY540hQPEsQ5ZMNyCabdZTPyPc8fZSq7be/w=; b=g9ads5ieTbLjflTFKBGFquwgI9A9+K2fjfdnRsWQ35d9fx4CVXkdV7V5XvyBu4f9en HOX9n+oaAPvVvSL1Mxs7oVUpmTeUb0lPAssN8nx9AwVZZx7iMclpqmWZCRRde4UjnLKi EJJUV5w2AHr6PbBTjDFVxooD3FDQvK3j95ze/DlpUIKhPBHi4SZ5eB9aVzQSSYvpm9Ds OiV8hwpoIjOzF0t7BkCpOkIwNNmbrWdKhcICkPp34D+6Hj+wC4qTEKQUWu0RjkfDL0TM ck5r9wA99funCOEpUNFNsbfkUThBnzmxW1S7uhliCZLSk4ICExj5pYVyRV1k/SjKX4YP bTNw== X-Gm-Message-State: ALoCoQliLXPGfhPpcxVy13+yIcmbOmldRBDUA2ms0eKp0gl9TZVPJaQc4/2cS6AE4kjiu4zsnBuGPn+ERvRrIbiNg26CvmTXjsoJVjqonLIS3IipLZyegYU30bB3nrqe4E8wr6Zbu8jiPjr5PCLV4dKx+bnAKcp/EFG5+xtDUakAk+VDXtspWNc= MIME-Version: 1.0 X-Received: by 10.66.243.49 with SMTP id wv17mr33631802pac.18.1441160002042; Tue, 01 Sep 2015 19:13:22 -0700 (PDT) Message-ID: <047d7b11194bfccb32051eba3541@google.com> Date: Wed, 02 Sep 2015 02:13:22 +0000 Subject: Help, --target_board=native-stdio-gdbserver is unusable From: Doug Evans To: gdb-patches@sourceware.org, palves@redhat.com, gbenson@redhat.com X-IsSubscribed: yes Hi. Has anyone tried running the testsuite with native-stdio-gdbserver now that we're auto-fetching files from the inferior? With 7.9 the following completes in 2:39 minutes. With trunk it completes in 21:09. make check RUNTESTFLAGS="--target_board=native-stdio-gdbserver gdb.trace/*.exp" Also, looking through gdb.log I'm seeing the same files apparently being fetched multiple times. E.g., Reading /foo/lib64/libm.so.6 from remote target... Reading /foo/lib64/libc.so.6 from remote target... Reading /foo/lib64/libm-2.19.so.debug from remote target... Reading /foo/lib64/.debug/libm-2.19.so.debug from remote target... Reading /foo/lib64/.debug/libm-2.19.so.debug from remote target... Reading /foo/lib64/libc-2.19.so.debug from remote target... Reading /foo/lib64/.debug/libc-2.19.so.debug from remote target... Reading /foo/lib64/.debug/libc-2.19.so.debug from remote target... Note that foo.so.debug is read once and then .debug/foo.so.debug is read twice. I haven't tried any other gdbserver combinations. I suspect all of them have the same issue w.r.t. slowness. How about something like this? Or have people thought of solving this a different way? [I'd clean that up and add a comment before committing it.] It'd also be nice to have a test that explicitly exercises the fetching of remote files in gdb.server/foo.exp, even with native-stdio-gdbserver. Another thing I noticed. The usability of "set debug remote 1" has vastly dropped. Can we not print the contents of files that are fetched, unless "set debug remote 2" or some such? That may be hard, I haven't looked at whether the code can easily know the received data is for a fetched file, but it's really bad. We've got to do something. Cheers. diff --git a/gdb/testsuite/boards/native-stdio-gdbserver.exp b/gdb/testsuite/boards/native-stdio-gdbserver.exp index 2ec2a47..c6f2027 100644 --- a/gdb/testsuite/boards/native-stdio-gdbserver.exp +++ b/gdb/testsuite/boards/native-stdio-gdbserver.exp @@ -58,6 +58,8 @@ proc ${board}_spawn { board cmd } { verbose -log "${board}_spawn: $board $cmd" + gdb_test_no_output "set sysroot" + # Save the command to start gdbserver for later retrieval by # ${board}_get_remote_address. global stdio_gdbserver_command