From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12556 invoked by alias); 22 Jul 2011 16:43:59 -0000 Received: (qmail 12548 invoked by uid 22791); 22 Jul 2011 16:43:58 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Jul 2011 16:43:45 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8F92B2BB1CE; Fri, 22 Jul 2011 12:43:44 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0aJpCUVVfIhG; Fri, 22 Jul 2011 12:43:44 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5E1DE2BB1C8; Fri, 22 Jul 2011 12:43:44 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id E7427145615; Fri, 22 Jul 2011 09:43:41 -0700 (PDT) Date: Fri, 22 Jul 2011 16:53:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: Paul Pluzhnikov , gdb-patches@sourceware.org Subject: Re: [RFC] Make target_read_string faster over high-latency links. Message-ID: <20110722164341.GC5177@adacore.com> References: <20110715180748.A0390190BC2@elbrus2.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00626.txt.bz2 > Paul> 1. is it ok to read strings 128 bytes at a time, or are there > Paul> scenarios (JTAG?) where the latency is low but throughput is also > Paul> low (and so reading "unnecessary" data is expensive) ? > > I don't know, but I assume so. I think that the risk is to attempt a read that gets past the readable memory region. I don't remember if GDB is protecting itself against this sort of thing (by checking the range against known regions), but I remember having problems on LynxOS for instance, where we tried to read some data on the stack, tried to read too much in one go, and ended up getting a failure and no data as a result. That was a while ago, so may be OBE... > What about making it possible for gdbserver to do the string-reading > itself, with a fallback to the existing code for older versions? Then > you don't need a parameter or any tuning. Seems like a good idea to me. -- Joel