From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14336 invoked by alias); 12 May 2011 06:17:02 -0000 Received: (qmail 14322 invoked by uid 22791); 12 May 2011 06:17:01 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.23) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 12 May 2011 06:16:46 +0000 Received: (qmail 20534 invoked by uid 0); 12 May 2011 06:16:44 -0000 Received: from 199.64.72.252 by www056.gmx.net with HTTP; Thu, 12 May 2011 08:16:41 +0200 (CEST) Content-Type: text/plain; charset="utf-8" Date: Thu, 12 May 2011 06:17:00 -0000 From: "Klaus Rudolph" In-Reply-To: Message-ID: <20110512061641.103010@gmx.net> MIME-Version: 1.0 References: <20110511090850.28500@gmx.net> Subject: Re: automated cast to different data type possible? To: Tom Tromey , gdb@sourceware.org Content-Transfer-Encoding: 8bit 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: 2011-05/txt/msg00047.txt.bz2 Tom Tromey wrote: > Klaus> Base* ptr1=new A; > Klaus> Base* ptr2=new B; > > Klaus> Now I want to debug ptr1. print returns only the output for base. > OK > Klaus> But I want to see, the type is a object of class A. > > You want "set print object on". This only works with classes which includes a vtable, but there is no virtual function inside that hierarchy. regards Klaus -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de