From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24495 invoked by alias); 5 Mar 2008 19:52:10 -0000 Received: (qmail 24475 invoked by uid 22791); 5 Mar 2008 19:52:08 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Mar 2008 19:51:29 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id AAC0F3C29A; Wed, 5 Mar 2008 11:51:27 -0800 (PST) Subject: Re: guessing where address belongs to From: Michael Snyder To: Eli Zaretskii Cc: Yakov Lerner , gdb@sourceware.org In-Reply-To: References: Content-Type: text/plain Date: Wed, 05 Mar 2008 19:56:00 -0000 Message-Id: <1204746687.19253.610.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit 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/msg00054.txt.bz2 On Tue, 2008-03-04 at 21:42 +0200, Eli Zaretskii wrote: > > Date: Tue, 4 Mar 2008 10:15:42 +0200 > > From: "Yakov Lerner" > > > > Is there command to have gdb guess which memory object this > > address belongs to (which function ... which stack frame .. which static > > object .. which head object )? > > I think you want "info symbol". That will help -- if the address is associated with a symbol. For stack and heap pointers it's not always helpful. I don't think there is a single command to do what you want, but "info target" will be helpful -- it will show all loaded sections and their memory ranges. You can fit the address into one of them (if it fits). "info file" is an alias for this (I think). This shows the sections for shared libraries too, which is a plus. Maybe if you can mock up a spec for what it is you want, it wouldn't be that difficult to implement a new command for it...