From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5746 invoked by alias); 20 Sep 2009 20:30:20 -0000 Received: (qmail 5724 invoked by uid 22791); 20 Sep 2009 20:30:13 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Sep 2009 20:30:08 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 22E1E10EA2; Sun, 20 Sep 2009 20:30:07 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id B1BE510DA8; Sun, 20 Sep 2009 20:30:06 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MpT2r-0000lh-Vr; Sun, 20 Sep 2009 16:30:05 -0400 Date: Sun, 20 Sep 2009 20:30:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: Vladimir Prus , gdb@sources.redhat.com Subject: Re: Symbols/blocks questions Message-ID: <20090920203005.GA2877@caradoc.them.org> Mail-Followup-To: Joel Brobecker , Vladimir Prus , gdb@sources.redhat.com References: <200909191552.02677.ghost@cs.msu.su> <200909192041.14173.ghost@cs.msu.su> <20090919170155.GO7961@adacore.com> <200909192235.37739.ghost@cs.msu.su> <20090920155154.GS7961@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090920155154.GS7961@adacore.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2009-09/txt/msg00253.txt.bz2 On Sun, Sep 20, 2009 at 08:51:54AM -0700, Joel Brobecker wrote: > > Well, string rendition is not really a challenge. You take > > struct block *, and then use phex :-) The id need not be > > stable across debug sessions, it just should be stable within > > one debug session. > > OK - I just thought that you wanted the user to be able to identify > these blocks from the source code. The same way we do when doing > > (gdb) print FUNC::VAR > > If you think people will be happy with an arbitrary block ID, then > indeed, that's easy (it's actually how task IDs are identified in > VxWorks, it's the address of the TCB). FWIW, I think we should avoid using internal pointers in the MI interface. Not only does it open up a can of worms (should we really be dereferencing user-supplied pointers? how long are their lifetimes?), but it's going to make it hard to reproduce bugs given an MI session transcript. The inline function support has a way of representing blocks as tuples. That might help. The tuples are start address and "depth"; the depth number would be different here, but serves the same purpose. -- Daniel Jacobowitz CodeSourcery