Do you know of a tool to identify "dead" code? I.e. not accessed by anything else? [gprof seems to be able to add usage count on a per-line base, but that's just for the things actually used in the profile run...]
Andre, I have written a tiny shell script that retrieves all symbols from (a) ./src/lyx and (b) the *.o files in the src directory (excluding src/tex2lyx).
Afterwards, it compares the two sets of symbols and outputs a reduced list of abolished symbols.
If you like the script, please add it to the cvs repository (whereever you it fits).
Attached please also find a sample output (file d-symbols) for the current cvs and the qt frontend.
Kind regards,
Michael
find-unused-symbols.sh
Description: Bourne shell script> (anonymous namespace)::Correction* std::__copy_backward<(anonymous > namespace)::Correction*, (anonymous namespace)::Correction*>((anonymous > namespace)::Correction*, (anonymous namespace)::Correction*, (anonymous > namespace)::Correction*, std::random_access_iterator_tag) > (anonymous namespace)::Correction* std::__copy_backward_aux<(anonymous > namespace)::Correction*, (anonymous namespace)::Correction*>((anonymous > namespace)::Correction*, (anonymous namespace)::Correction*, (anonymous > namespace)::Correction*) > (anonymous namespace)::Correction::correct(MathAtom&, char) const > (anonymous namespace)::Correction::operator=((anonymous namespace)::Correction > const&) > (anonymous namespace)::Correction::read(std::basic_istream<char, > std::char_traints<char> >&) > (anonymous namespace)::Correction::write(std::basic_ostream<char, > std::char_traits<char> >&) const > (anonymous namespace)::Corrections::correct(MathAtom&, char) const > (anonymous namespace)::Corrections::insert((anonymous namespace)::Correction const&) > (anonymous namespace)::char_set_size > (anonymous namespace)::initAutoCorrect() > (anonymous namespace)::operator<<(std::basic_ostream<char, std::char_traits<char> > >&, (anonymous namespace)::Correction&) > (anonymous namespace)::operator>>(std::basic_istream<char, std::char_traints<char> > >&, (anonymous namespace)::Correction&) > (anonymous namespace)::parser_buf<char, std::char_traits<char> >::seekoff(long, > std::_Ios_Seekdir, std::_Ios_Openmode) > (anonymous namespace)::parser_buf<char, std::char_traits<char> > >::seekpos(std::fpos<__mbstate_t>, std::_Ios_Openmode) > (anonymous namespace)::parser_buf<char, std::char_traits<char> >::setbuf(char*, int) > (anonymous namespace)::theCorrections > ControlForks* boost::get_pointer<ControlForks>(ControlForks*) > ControlForks* const& > boost::_bi::list0::operator[]<ControlForks*>(boost::_bi::value<ControlForks*> > const&) const > ControlForks::apply() > ControlForks::clearParams() > ControlForks::getCommand(int) const > ControlForks::getPIDs() const > ControlForks::kill(int) > ControlForks::setParams() > ControlPreamble::apply() > ControlPreamble::clearParams() > ControlPreamble::params() const > ControlPreamble::params(std::basic_string<char, std::char_traits<char>, > std::allocator<char> > const&) > ControlPreamble::setParams() > MathBigInset::clone() const > MathBigInset::draw(PainterInfo&, int, int) const > MathBigInset::increase() const > MathBigInset::metrics(MetricsInfo&, Dimension&) const > MathBigInset::normalize(NormalStream&) const > MathBigInset::size() const > MathBigInset::write(WriteStream&) const > MathInferInset::clone() const > MathInferInset::draw(PainterInfo&, int, int) const > MathInferInset::metrics(MetricsInfo&, Dimension&) const > MathInferInset::write(WriteStream&) const > _GLOBAL__I__ZN35_GLOBAL__N_math_autocorrect.CyV9Hjb10Correction4readERSi > _GLOBAL__I__ZN37_GLOBAL__N_cpp_regex_traits.cpp50DUjb16re_char_class_idE > __assert_fail > __cxa_atexit > __cxa_pure_virtual > __dynamic_cast > __errno_location > __fxstat > __lxstat > __xstat > _exit > abort > access > asctime > atof > atoi > bindtextdomain > catclose > catgets > catopen > chdir > chmod > close > closedir > credits > ctime > difftime > dup2 > execvp > exit > fclose > fcntl > fdopen > fflush > fgetc > fgets > floor > fopen > fork > fprintf > fputc > fputs > fread > fseek > ftell > getcwd > getenv > geteuid > getpid > getpwuid > gettext > gmtime > gui_ShowDocument > gui_ShowForks > gui_ShowPreamble > gui_ShowPreferences > gui_ShowPrint > gui_ShowSearch > gui_ShowSendto > gui_ShowSpellchecker > gui_show_dialog > isalnum > isalpha > iscntrl > isdigit > islower > ispunct > isspace > isupper > isxdigit > kill > localtime > lyx::support::putenv(char const*) > math_autocorrect(MathAtom&, char) > math_autocorrect(MathAtom&, char)::initialized > memcmp > memcpy > memmove > memset > mkdir > mkfifo > mkstemp > mmap > munmap > open > opendir > operator delete(void*) > operator delete[](void*) > operator new(unsigned) > operator new[](unsigned) > pclose > pipe > popen > putenv > read > readdir > readlink > rename > rmdir > select > setlocale > setvbuf > signal > sprintf > sscanf > stderr > strcat > strchr > strcmp > strcpy > strdup > strerror > strftime > strlen > strncmp > strpbrk > strtol > strxfrm > system > textdomain > time > tolower > toupper > typeinfo for (anonymous namespace)::parser_buf<char, std::char_traits<char> > > typeinfo for ControlForks > typeinfo for ControlPreamble > typeinfo for MathBigInset > typeinfo for MathInferInset > typeinfo name for (anonymous namespace)::parser_buf<char, std::char_traits<char> > > typeinfo name for ControlForks > typeinfo name for ControlPreamble > typeinfo name for MathBigInset > typeinfo name for MathInferInset > unlink > utime > vtable for (anonymous namespace)::parser_buf<char, std::char_traits<char> > > vtable for ControlForks > vtable for ControlPreamble > vtable for MathBigInset > vtable for MathInferInset > waitpid > write