From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28271 invoked by alias); 6 Mar 2008 10:46:22 -0000 Received: (qmail 28262 invoked by uid 22791); 6 Mar 2008 10:46:21 -0000 X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.171) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 06 Mar 2008 10:45:57 +0000 Received: by wf-out-1314.google.com with SMTP id 29so2350500wff.24 for ; Thu, 06 Mar 2008 02:45:56 -0800 (PST) Received: by 10.143.37.20 with SMTP id p20mr1105640wfj.236.1204800356404; Thu, 06 Mar 2008 02:45:56 -0800 (PST) Received: by 10.143.125.5 with HTTP; Thu, 6 Mar 2008 02:45:56 -0800 (PST) Message-ID: Date: Thu, 06 Mar 2008 13:13:00 -0000 From: "Yakov Lerner" To: "Andreas Schwab" , gdb@sourceware.org Subject: Re: guessing where address belongs to In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1204746687.19253.610.camel@localhost.localdomain> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00065.txt.bz2 On Thu, Mar 6, 2008 at 12:05 PM, Andreas Schwab wrote: > "Yakov Lerner" writes: > > > Gdb has no integration with malloc, correct ? > > Gdb has no way of enumerating all malloced > > pieces ("heap objects"), correct ? > > > > Or gdb does have a way of guessing which "heap > > object" some address X (that points inside the heap) belongs to ? > > The details are highly dependent on the malloc implementation. There is > no way to find that out without intimate knowledge of the > implementation. You don't need details of malloc guts for that. It's enough to hook to the entry and return from malloc,free,realloc. Yakov