From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22599 invoked by alias); 13 Apr 2011 14:59:58 -0000 Received: (qmail 22590 invoked by uid 22791); 13 Apr 2011 14:59:58 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Apr 2011 14:59:49 +0000 Received: by qwa26 with SMTP id 26so534367qwa.0 for ; Wed, 13 Apr 2011 07:59:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.220.149 with SMTP id hy21mr6378973qcb.51.1302706789085; Wed, 13 Apr 2011 07:59:49 -0700 (PDT) Received: by 10.229.83.194 with HTTP; Wed, 13 Apr 2011 07:59:49 -0700 (PDT) Date: Wed, 13 Apr 2011 14:59:00 -0000 Message-ID: Subject: cast in gdb python results in virtual baseclass botch From: Christoph Mathys To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 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-04/txt/msg00047.txt.bz2 I try to cast a gdb.Value to another type. There are cases where it works, and others where it doesn't, and I don't really know why. If it doesn't work, I get the following exception when I call cast(): RuntimeError: virtual baseclass botch I use gdb 7.2, which apparently does not yet support dynamic_cast(). Both variables are stored inside a boost::shared_ptr, and I try to cast to contained interface pointer to a specific implementation pointer. Christoph