From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10439 invoked by alias); 29 Jul 2011 08:11:21 -0000 Received: (qmail 10415 invoked by uid 22791); 29 Jul 2011 08:11:20 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Jul 2011 08:11:06 +0000 From: "dj170590 at hotmail dot com" To: gdb-prs@sourceware.org Subject: [Bug mi/13041] New: Virtual base class botch X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: mi X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dj170590 at hotmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 29 Jul 2011 08:11:00 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2011-q3/txt/msg00072.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=13041 Summary: Virtual base class botch Product: gdb Version: 7.2 Status: NEW Severity: normal Priority: P2 Component: mi AssignedTo: unassigned@sourceware.org ReportedBy: dj170590@hotmail.com Hello, First of all I'd like to say I do use a library (SystemC and TLM)and alot of classes in it use virtual inherintance. So I cannot ignore the virtual inheritance. My program uses GDB MI and it really depends on SystemC/TLM so I can hardly make a program which can construct the realy problem, but i try to explain the bug I think it is. When I do use "-var-list-children --all-values VARNAME" on a var where VARNAME is of an object derived from 2 class in a particular order everything goes ok(like Example01), but when a switch them I get a virtual base class botch so I think it's a bug? Example 01 Everything is ok: class CPU: public tlm_bw_transport_if<>, public sc_module { public: tlm_initiator_socket<> socket; SC_CTOR(CPU): //constructor socket("CPUSocketNAME") { socket.bind(*this); } virtual ~CPU(){} //Destructor //....... //....... etc }; tlm_bw_transport_if is out of the TLM source and this class is declared as: template class tlm_bw_transport_if : public virtual tlm_bw_nonblocking_transport_if , public virtual tlm_bw_direct_mem_if {}; And those base classes are inherited from some other virtual base classes etc. With this example it goed wrong: class CPU: public sc_module, public tlm_bw_transport_if<> { public: tlm_initiator_socket<> socket; SC_CTOR(CPU): //constructor socket("CPUSocketNAME") { socket.bind(*this); } virtual ~CPU(){} //Destructor //....... //....... etc }; void main() { CPU cpu01("myCPU"); } The think my program does is setting a breakpoint in the sc_module constructor So that's the point my program stays when I do try to get the varname where the CPU object is stored in(that's cpu01). When I do have it, I use the command "-var-list-children --all-values VARNAME" to get all the base classes of CPU object cpu. But when i try this in the first example everything is OK and I can get the base classes of tlm_bw_transport_if<>, but when I use the GDB MI command with example 2 on the variabele it sais "virtual base class botch" var01 is a gdb variabele on cpu01. the gdb command I use, is like "-var-list-children --all-values var01.tlm::tlm_fw_transport_if" I hope I am clear about the problem and you can understand the problem. Sorry if my english or explaination is a bit bad. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.