ATLAS Offline Software
Loading...
Searching...
No Matches
python.sources Namespace Reference

Functions

 handle_comp_dir (fname, dirname)
 handle_atlas_buildarea (fname)
 _objfile_hook (ev)

Variables

 _handled_dirs = set()
 _handled = set()

Function Documentation

◆ _objfile_hook()

python.sources._objfile_hook ( ev)
protected

Definition at line 104 of file sources.py.

104def _objfile_hook (ev):
105 o = ev.new_objfile
106 if o.filename.startswith ('/cvmfs'):
107 handle_atlas_buildarea (o.filename)
108 return
109

◆ handle_atlas_buildarea()

python.sources.handle_atlas_buildarea ( fname)

Definition at line 88 of file sources.py.

88def handle_atlas_buildarea (fname):
89 if fname in _handled:
90 return
91 import subprocess
92 files = set()
93 out = subprocess.getoutput ('objdump --dwarf=info %s | grep DW_AT_comp_dir' % fname)
94 for l in out.split('\n'):
95 pos = l.find('/')
96 if pos >= 0:
97 files.add (l[pos:].strip())
98 for f in files:
99 handle_comp_dir (fname, f)
100 _handled.add(fname)
101 return
102
103
STL class.

◆ handle_comp_dir()

python.sources.handle_comp_dir ( fname,
dirname )

Definition at line 62 of file sources.py.

62def handle_comp_dir (fname, dirname):
63 if dirname in _handled_dirs:
64 return
65 _handled_dirs.add (dirname)
66 if not dirname.startswith ('/build'): return
67
68 pos = dirname.rfind ('/build/')
69 if pos < 0: return
70 pos += 7
71 pos = dirname.find ('/', pos)
72 if pos < 0: return
73 pack = dirname[pos+1:]
74
75 pos = fname.find ('/InstallArea/')
76 if pos < 0: return
77 pos += 13
78 pos = fname.find ('/', pos)
79 if pos < 0: return
80 srcroot = fname[:pos] + '/src'
81 pdir = srcroot + '/' + pack
82 for (dirpath, dirnames, filenames) in os.walk (pdir):
83 print ('dir ' + dirpath)
84 gdb.execute ('dir ' + dirpath)
85 return
86

Variable Documentation

◆ _handled

python.sources._handled = set()
protected

Definition at line 87 of file sources.py.

◆ _handled_dirs

python.sources._handled_dirs = set()
protected

Definition at line 61 of file sources.py.