can't find class named `foo', as given by C++ RTTI

Daniel Berlin
Fri Jun 29 23:43:00 GMT 2001

--On Friday, June 29, 2001 5:15 PM -0500 Jim Blandy 
<> wrote:

> Daniel Berlin <> writes:
>> I'm too busy with what I have now, and with my summer job at IBM
>> Research.
> Congrats!
>> But i'll happily implement the gcc side of it if someone wants to take
>> gdb's symbol structures and make them able to handle languages of the
>> early nineties and beyond.
>> Heck, i've even got a collection of references for symbol table
>> designs that can handle these things properly and efficiently, and
>> close enough to the existing basic symbol table structure that you
>> wouldn't have to start anywhere near from scratch, or come up with a
>> design on your own.
> Could you post those references?
I'm still trying to find which computer I put them on.
However, one immediately comes to mind, since the book is sitting next to 
But first, realize that to implement in GDB, you must do one of two things.
1. Change GDB to only explicitly keep track of the current scope (IE like 
the compilers do), and magically have the symbols for that scope.  This 
would require so much redesign it's not even funny.
2. Convert what the designs say from stacks to blockvectors (IE most are 
based on stacks where you only keep the current visible scopes around.  We 
need all the scopes, so you just have to think of how to do the conversion 
between the two in your head. It's usually not that difficult to do at all.)

I'd suggest, for obvious reasons, 2.

But anyway, here's the one reference I have sitting next to me, while i 
hunt the rest:

Section 3 of Advanced Compiler Design and Implementation - Steven Muchnick

It's titled "Symbol table structure".

He explicitly covers how to handle open and closed scope languages, and 
uses blocks like we do (Except the actual symbols aren't in the blocks, the 
blocks have a pointer into a large table of symbols, which is also hashed. 
Much like the minsyms are linked to each other, and placed into the minsym 
hash table).

This is probably the easiest one to implement anyway, and has pseudocode 
and pictures. :)

I should have the other references by the end of the weekend.

More information about the Gdb mailing list