From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16950 invoked by alias); 15 Jan 2003 18:47:46 -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 16937 invoked from network); 15 Jan 2003 18:47:43 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 15 Jan 2003 18:47:43 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h0FIlbw12804; Wed, 15 Jan 2003 10:47:37 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Michael Elizabeth Chastain Cc: drow@mvista.com, gdb@sources.redhat.com Subject: Re: casting in gdb References: <200212150547.gBF5lg511015@duracef.shout.net> From: David Carlton Date: Wed, 15 Jan 2003 18:47:00 -0000 In-Reply-To: <200212150547.gBF5lg511015@duracef.shout.net> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-01/txt/msg00273.txt.bz2 On Sat, 14 Dec 2002 23:47:42 -0600, Michael Elizabeth Chastain said: > 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. I was going through my old messages, and I noticed this one. For what it's worth, Apple has implemented something like this for strings in Objective C, where they actually print out the string in question, and they say it works pretty well. Apparently the implementation of strings is complicated enough that they really didn't want to tie it to the implementation; so GDB prints out Objective C strings by actually doing the method call. Of course, the above message was part of a thread that noted that, in C++, the appropriate methods might not be compiled in. That's a real problem; I'm not sure what to do about that. David Carlton carlton@math.stanford.edu