This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC - Python scripting] New methods Symtab.global_block and Symtab.static_block (docs included)
Siva> Similarly, if my
Siva> understanding is correct, static functions and static variables
Siva> defined in a source file should always be present in a static block.
Siva> Hence, we again document saying that the user rely only on this
Siva> information being constant. Does this sound reasonable?
Matt> the following from (possibly outdated) symtab.c stuff is what i did
Matt> find, i believe there is other uncommented occurrences, anyhow given
Matt> the fudge and lack of errors I wouldn't be suprised to weirdness here
Matt> go unnoticed.
Tom> I've always assumed these comments are just wrong.
Tom> If this can really happen, then the bug should be fixed in the symbol
Tom> readers, not hacked around elsewhere. ?IMNSHO of course.
Doug> Yep.
Doug> Something I hope attention to the symbol handling will dig into.
To be frank, I do not understand much of the code in dwarf2read.c yet.
However, I focused on functions and variables in my comment because
LOCAL and GLOBAL bindings in a file are present right in the ELF
.symtab section. If at all something is not being classified correctly
in GDB, then it should be a bug (not necessarily in GDB?). I did not
talk about types because they are treated as static when compiled as a
C program, and as global when compiled as a C++ program (in fact, I
thought this was Doug's concern to begin with!).
Overall, wrt this patch, what should we conclude?
Thanks,
Siva Chandra