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]

symbol table for include files - why?


Hi,
 
In Solaris 2.8 environment with stabs, when GDB creates the partial symbol tables (PST), it use to generate PST for every include files. Also while generating the full symbol table, GDB allocates full symbol table for all those include files.
 
The PST for the include files are empty except for a dependency towards the parent where the file is included. All the partial symbols from the include file are part of the PST of the parent. The function that creates the PSTs for the include file is end_psymtab(). The PST for a include file is used to identify the PST for the parent file which is helpful in case of "list" command or putting the breakpoint at some line number of the include file.
 
Is there any usage of the PSTs for the include files other than 'list' command or putting breakpoint at some line number?
 
Most of the cases include files do not have any line number information. So is it not a big overhead to keep those in PST list? In some of the executables I found around 7 lacs of PSTs for the include files. In such cases the traversal through the PST list is time consuming.
 
The full symbols from the include files are also part of the parent file. So searching a symbol (ptype command) is not a problem even if we do not generate/ allocate the full symbol table for the include files. If the include file do not have any line number information, should we keep/ allocate full symbol table for the include files?
 
Is there any optimization possible here???
 
 
regards,
mahata.

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