🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Bryan Boreham Wed, 20 Sep 1989 12:53
Why gdb doesn't print out baseclasses in C++.
#268
Author: Bryan Boreham
Date: Wed, 20 Sep 1989 12:53
33 lines
1682 bytes
I don't know whether or not this affects everybody, but for me, gdb
has always claimed not to know about baseclasses. It would say "Type
not defined in this context". 

My guess is that this is because class foo as a baseclass is
represented in the symbol table by a copy of the information on plain
vanilla class foo. Unfortunately, this copy is taken when foo is
masquerading as an undefined reference. 

I offer the following fix.

Bryan.

BTW: What is a "via_virtual" baseclass?


kewill% diff -c dbxread.c~ dbxread.c
*** dbxread.c~  Tue Jul 11 03:38:46 1989
--- dbxread.c   Wed Sep 20 13:35:12 1989
***************
*** 4231,4236 ****
--- 4231,4241 ----
          *pp += 1;             /* skip trailing ';' */
          baseclass_vec[i] = lookup_basetype_type (baseclass, offset, via_virtual, via_public);

+         /* We should be able to fix this up at the end.
+            Otherwise, it just gets left undefined forever. */
+         if (TYPE_FLAGS(baseclass_vec[i]) & TYPE_FLAG_STUB)
+           add_undefined_type (baseclass_vec[i]);
+
          /* Make this baseclass visible for structure-printing purposes.  */
          new = (struct nextfield *) alloca (sizeof (struct nextfield));
          new->next = list;
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads