This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: current namespace game plan


On Fri, 4 Oct 2002 18:11:17 -0400, Daniel Jacobowitz <drow@mvista.com> said:

> You're skipping what I'd consider the most important step.

> We can't even get namespaces right when the user gives us a fully
> qualified name.  We do it for variables and functions by resorting to
> the minsym and physname.  But types?  No way.  They all get entered in
> the top level.

Whoops; good thing I asked.

Types are a little tricky without proper debugging information.  But
now I'm starting to remember some e-mails we had a month or so ago
where we said that, for a class, you could figure out the type by
looking at the physname of one of its members (possibly an implictly
defined function, but there should always be something).  Which
probably explains this:

>   - Inference support in both DWARF-2 and Stabs readers; I have the
> prototypes of this all done.  We can correctly infer a type's full
> name for everything but enums, I believe.

Because with enums, there's simply no way to get that information
without improved debugging information.

Fortunately, that sounds like it should complement the other stuff
that I was proposing as the first step, and indeed should be
orthogonal to that.  Do your changes create a symbol whose name is
fully qualified and whose demangled_name is null?  That seems to me
like it should work.

> And:
>   - Code to not print excessive qualification on names, for
> instance printing the fully qualified type in constructors; it's ugly
> and causes needless testsuite churn.

Hmm.  I'll keep that in the back of my mind, but you'll probably have
to remind me periodically that this is important.

> What I really should do is bundle up what I have onto a branch.  If
> I feel inspired enough I'll try to do it tomorrow.  The last point
> caused me to stop and focus on type printing and type correctness
> for a bit, and I got completely sidetracked; a branch would help a
> lot.

That would be great; and then one or the other of us could try to grab
out chunks of that.  E.g. it seems to me that the type inference stuff
that you mentioned would be an improvement to GDB right now, aside
from any other further namespace improvements.

David Carlton
carlton@math.stanford.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]