Utility Scripts

Contents

Finding Global Symbols

The utility find_global_symbol.sh can be used to look up mangled or demangled names. For example:-
  find_global_symbol.sh "TObject::Copy(TObject&) const" 
or:-
  find_global_symbol.sh  _ZNK7TObject4CopyERS_
It decides if the named is demangled by looking to see if it includes a '('. It then proceeds to search through every path in LD_LIBRARY_PATH (although it skips duplicates, the current directory and /usr/lib) and prints any match it finds. For example:-
Checking libraries in /data1/software/root/cvsroot/Linux-2-4GCC3_2/lib...
    Found in libCore.so
        Entry: 16430:000f4ba6 T _ZNK7TObject4CopyERS_
        Translates to 000f4ba6 T TObject::Copy(TObject&) const
    Found in libEG.so
        Entry: 943:         U _ZNK7TObject4CopyERS_
        Translates to          U TObject::Copy(TObject&) const
The symbol _ZNK7TObject4CopyERS_ is found in libCore.so and libEG.so and translates to TObject::Copy(TObject&) const. In the libraries the symbol type is as follows:-
  1. T - the symbol is in the text (code) section and hence defines the symbol. So libCore.so defines _ZNK7TObject4CopyERS_
  2. U - the symbol is undefined. So libEG.so requires _ZNK7TObject4CopyERS_.

The find_global_symbol.sh command can accept the following options:-


Comparing MemCheck Output

The utility compare_memcheck_info can be used to look for continuous memory leaks. The MemCheck leak checker is used to analyse two jobs, once run for only a few events and the other for a few more. Then compare_memcheck_info compares the two analysis files looking for leaks that get worse as the job runs. See notes on MemCheck for details.

n west (APC)
Last modified: Sat Mar 22 23:54:49 GMT 2003