From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11302 invoked by alias); 16 Jul 2004 09:04:27 -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 11220 invoked from network); 16 Jul 2004 09:04:25 -0000 Received: from unknown (HELO NUTMEG.CAM.ARTIMI.COM) (217.40.111.177) by sourceware.org with SMTP; 16 Jul 2004 09:04:25 -0000 Received: from mace ([192.168.1.25]) by NUTMEG.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.0); Fri, 16 Jul 2004 10:03:02 +0100 From: "Dave Korn" To: "'Charlls Quarra'" , Subject: RE: dumping and browsing heap Date: Fri, 16 Jul 2004 11:11:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <20040716020250.84785.qmail@web41810.mail.yahoo.com> Message-ID: X-OriginalArrivalTime: 16 Jul 2004 09:03:02.0593 (UTC) FILETIME=[B30FE310:01C46B13] X-SW-Source: 2004-07/txt/msg00198.txt.bz2 > -----Original Message----- > From: gdb-owner On Behalf Of Charlls Quarra > Sent: 16 July 2004 03:03 > i want to give a look at the heap globally, so i do: > > dump memory blafile 0x8100000 0x8300000 > > > whenever i find something interesting in the blafile > (i open it with vi) a g command gives me > the absolute position of the desired byte in the file > (at least that is the expected behaviour) > > the dump should contain 0x200000 (2097152 in decimal) > bytes, however it happens to contain 2295106 (197954 > bytes in excess). Someone knows how to account for > these extra bytes? Mmm. You're using vi. Probably opens the file in textmode. Is anything perhaps translating every LF to CR+LF, thereby adding an 0x0d in front of every 0x0a in the original file? The way to find out would be tr -c -d '\012' < blafile | wc -c and if the result is 197954, there's your suspect. cheers, DaveK -- Can't think of a witty .sigline today....