From: Daniel Berlin <dan@cgsoftware.com>
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: Benjamin Kosnik <bkoz@redhat.com>, gdb@sources.redhat.com
Subject: Re: can't find class named `foo', as given by C++ RTTI
Date: Fri, 29 Jun 2001 23:43:00 -0000 [thread overview]
Message-ID: <13482076.993868984@[192.168.0.106]> (raw)
In-Reply-To: <npithfrkz7.fsf@zwingli.cygnus.com>
--On Friday, June 29, 2001 5:15 PM -0500 Jim Blandy
<jimb@zwingli.cygnus.com> wrote:
>
> Daniel Berlin <dan@cgsoftware.com> 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
me.
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.
--Dan
next prev parent reply other threads:[~2001-06-29 23:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-27 21:55 Benjamin Kosnik
2001-06-27 22:25 ` Daniel Berlin
2001-06-27 22:51 ` Benjamin Kosnik
2001-06-27 23:26 ` Daniel Berlin
2001-06-28 1:37 ` Benjamin Kosnik
2001-06-27 23:06 ` Daniel Berlin
2001-06-28 1:32 ` Benjamin Kosnik
2001-06-28 16:02 ` Daniel Berlin
2001-06-28 16:14 ` Benjamin Kosnik
2001-06-29 15:14 ` Jim Blandy
2001-06-29 23:43 ` Daniel Berlin [this message]
2001-06-30 10:14 ` Jim Blandy
2001-06-29 11:15 ` Jim Blandy
2001-06-29 11:20 ` Daniel Berlin
2001-06-29 11:34 ` Benjamin Kosnik
2001-06-29 11:38 ` Daniel Berlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='13482076.993868984@[192.168.0.106]' \
--to=dan@cgsoftware.com \
--cc=bkoz@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=jimb@zwingli.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox