From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31288 invoked by alias); 10 Oct 2005 21:05:50 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31281 invoked by uid 22791); 10 Oct 2005 21:05:47 -0000 Received: from cpc2-oxfd8-3-0-cust199.oxfd.cable.ntl.com (HELO cpc2-oxfd8-3-0-cust199.oxfd.cable.ntl.com) (82.15.10.199) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 10 Oct 2005 21:05:47 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by cpc2-oxfd8-3-0-cust199.oxfd.cable.ntl.com (8.13.4/8.13.4) with ESMTP id j9ALMNf9007742; Mon, 10 Oct 2005 22:22:23 +0100 Subject: Re: Laziness From: David Lecomber To: Daniel Jacobowitz Cc: gdb In-Reply-To: <20051010205046.GA5362@nevyn.them.org> References: <1128978249.13892.22.camel@cpc2-oxfd8-3-0-cust199.oxfd.cable.ntl.com> <20051010205046.GA5362@nevyn.them.org> Content-Type: text/plain Date: Mon, 10 Oct 2005 21:05:00 -0000 Message-Id: <1128979343.13892.25.camel@cpc2-oxfd8-3-0-cust199.oxfd.cable.ntl.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-10/txt/msg00064.txt.bz2 > Perhaps we should redefine set print elements to only print anything > pertaining to the original number of elements. That's a fine idea! > > Should we really really be reading all that memory, just to print the > > first element? I mean, not only is that slow, but it imposes a memory > > overhead in the GDB too! > > Not really, for the latter complaint; we discard them as they're read > in. Well, after they're read in, right? -- so that at peak it could be as much as the memory of the actual array. Not much of a problem for a small code, but imagine some vast numerical code where an array is more than half the actual available memory on the system - then GDB would fail.. These codes really do exist. Cheers David