From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2759 invoked by alias); 15 Dec 2002 16:05:51 -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 2709 invoked from network); 15 Dec 2002 16:05:50 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 15 Dec 2002 16:05:50 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18Nd9X-00024l-00; Sun, 15 Dec 2002 12:06:11 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18NbHz-0000fX-00; Sun, 15 Dec 2002 11:06:47 -0500 Date: Sun, 15 Dec 2002 08:05:00 -0000 From: Daniel Jacobowitz To: Michael Elizabeth Chastain Cc: jacqueslen@sympatico.ca, gdb@sources.redhat.com Subject: Re: casting in gdb Message-ID: <20021215160647.GA2407@nevyn.them.org> Mail-Followup-To: Michael Elizabeth Chastain , jacqueslen@sympatico.ca, gdb@sources.redhat.com References: <200212150547.gBF5lg511015@duracef.shout.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200212150547.gBF5lg511015@duracef.shout.net> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-12/txt/msg00215.txt.bz2 On Sat, Dec 14, 2002 at 11:47:42PM -0600, Michael Elizabeth Chastain wrote: > I'm playing with the idea that gdb should know more about the C++ > standard library types, in the same spirit that gdb knows that a C "char > *" usually points to a string terminated with '\0'. I would like gdb > to understood more about std::string, std::vector, std:map, and so on. > > Daniel J, what do you think? I think there's a pretty big problem with approaching the problem from this side. You can't do it by teaching GDB more about the _types_. You have to teach it more about the _implementation_. i.e. every time you do this it is tied to a particular STL implementation. I'm not saying that it's a bad idea, just that you need to look at it from the other side first. That said, we need generic facilities for target-specific type handling; that would be really nice. Do we care that this means "MyVector[0]" will make a function call and "std::vector[0]" won't? I don't think we will. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer