From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13352 invoked by alias); 2 May 2011 16:10:10 -0000 Received: (qmail 13338 invoked by uid 22791); 2 May 2011 16:10:08 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.nokia.com (HELO mgw-da01.nokia.com) (147.243.128.24) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 May 2011 16:09:50 +0000 Received: from gar.localnet (berwst16747.europe.nokia.com [172.25.167.47]) by mgw-da01.nokia.com (Switch-3.4.4/Switch-3.4.3) with ESMTP id p42G9lFa025366 for ; Mon, 2 May 2011 19:09:49 +0300 From: =?utf-8?q?Andr=C3=A9_P=C3=B6nitz?= To: gdb@sourceware.org Subject: Re: calling cast operator Date: Mon, 02 May 2011 16:10:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.32-21-generic; KDE/4.4.5; i686; ; ) References: <20110502155027.145630@gmx.net> In-Reply-To: <20110502155027.145630@gmx.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201105021809.49919.andre.poenitz@nokia.com> X-Nokia-AV: Clean 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/msg00008.txt.bz2 On Monday 02 May 2011 17:50:27 ext Klaus Rudolph wrote: > Hi all, > > can I use a cast operator from an object on gdb? > > class B > { > ... > }; > > class A > { > operator B() > }; > > anyFunc() > { > A a; > > -> breakpoint > } > > how can I get the value of the operation "a.operator B();" on the command line? > > print a.operator B() "print a.'operator B'()" might work, and possibly "print (B)a", too. Andre'