juha@tds.kth.se (Juha Sarlin) (08/25/89)
Gdb 3.2 shows a message like "Reading in symbols for foo.c...", when symbols for that file are needed for the first time. Actually the message is printed before parsing the symbols, but after the the string table has been read into memory. Sometimes several seconds are spent on the reading. Here is a patch to make the message appear before the string table read: *** /tmp/,RCSt1a03015 Thu Aug 24 18:25:11 1989 --- dbxread.c Thu Aug 24 18:08:45 1989 *************** *** 2606,2612 **** { struct cleanup *old_chain; int i; - extern int info_verbose; /* Give verbose info on gdb action. */ if (!pst) return; --- 2606,2611 ---- *************** *** 2624,2636 **** psymtab_to_symtab_1 (pst->dependencies[i], desc, stringtab, sym_offset); - /* Give debug message now so that you don't have staggered messages. */ - if (info_verbose) - { - printf_filtered ("Reading in symbols for %s...", pst->filename); - fflush (stdout); - } - if (pst->ldsymlen) /* Otherwise it's a dummy */ { /* Init stuff necessary for reading in symbols */ --- 2623,2628 ---- *************** *** 2651,2660 **** } pst->readin = 1; - - /* Finish up the debug error message. */ - if (info_verbose) - printf_filtered ("done.\n"); } /* --- 2643,2648 ---- *************** *** 2696,2701 **** --- 2684,2698 ---- if (pst->ldsymlen || pst->number_of_dependencies) { + extern int info_verbose; /* Give verbose info on gdb action. */ + + /* Give debug message now so that you don't have staggered messages. */ + if (info_verbose) + { + printf_filtered ("Reading in symbols for %s...", pst->filename); + fflush (stdout); + } + /* Open symbol file and read in string table */ stat (name, &statbuf); desc = open(name, O_RDONLY, 0); /* symbol_file_command *************** *** 2730,2735 **** --- 2727,2736 ---- perror_with_name (name); psymtab_to_symtab_1 (pst, desc, stringtab, SYMBOL_TABLE_OFFSET); + + /* Finish up the debug error message. */ + if (info_verbose) + printf_filtered ("done.\n"); /* Match with global symbols. This only needs to be done once, after all of the symtabs and dependencies have been read in. */ -- Juha Sarlin juha@tds.kth.se