ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to display derived objects


From: Grzegorz Jakacki
Subject: How to display derived objects
Date: Thu, 18 Dec 2003 13:05:01 +0800 (CST)

I have this C++ code:

    class Base {  // abstract
        ...
    };

    class Derived : public Base {
        ...
        int x_;
    };

    Base* p = new Derived;

When I do 'graph display *p' all I see is a Base subobject with vtable
info. In particular the display does not show the fields of Derived
object. Can I set up ddd so that it displays the actual object given a
pointer to base?

Thanks
Grzegorz

PS: My config: ddd-3.3.1, gdb-5.3, sparc-sun-solaris2.6


##################################################################
# Grzegorz Jakacki                       Huada Electronic Design #
# Senior Engineer, CAD Dept.              1 Gaojiayuan, Chaoyang #
# tel. +86-10-64365577 x2074               Beijing 100015, China #
# Copyright (C) 2003 Grzegorz Jakacki, HED. All Rights Reserved. #
##################################################################





reply via email to

[Prev in Thread] Current Thread [Next in Thread]