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] |
On Tuesday, September 17, 2002, at 02:02 PM, Daniel Jacobowitz wrote:
These types of problems are exactly why i said a lot of thought needs to be put into the design of the underlying structures, rather than just copying what we have because we have it.On Tue, Sep 17, 2002 at 01:54:07PM -0400, Andrew Cagney wrote:Depends on how you grow it :-) Something like (assuming a real languageWell, sort of. It won't be a DAG necessarily (I think that mutual"using" statements are legal in C++; I remember a GCC bug involving
them was fixed not long ago), and it will be somewhat complicated
figuring out which ones to look up (namespace links are different than
block scope links).
Don't forget that GDB doesn't need to model the language. Just the namespace behavior at a given PC. The effect of "using" would be to just grow a nametab in someway.This is legal C++: namespace D {} namespace C { using namespace D; int x, y; } namespace D { using namespace C; int x, z; } If using just grew a nametab we'd get into a great deal of trouble.
:-):
D:
0: x, z
1: x, y (from C)
2: ...
How you intend to do this efficiently I don't know. Remember that C uses D in turn, and that things "using"'d into D will therefore be visible in C.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |