Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions | Variables
python.sources Namespace Reference

Functions

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

Variables

 _handled_dirs
 

Function Documentation

◆ _objfile_hook()

def python.sources._objfile_hook (   ev)
private

Definition at line 104 of file sources.py.

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

◆ handle_atlas_buildarea()

def python.sources.handle_atlas_buildarea (   fname)

Definition at line 88 of file sources.py.

88 def 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 

◆ handle_comp_dir()

def python.sources.handle_comp_dir (   fname,
  dirname 
)

Definition at line 62 of file sources.py.

62 def 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 
87 _handled=set()

Variable Documentation

◆ _handled_dirs

python.sources._handled_dirs
private

Definition at line 61 of file sources.py.

python.sources._objfile_hook
def _objfile_hook(ev)
Definition: sources.py:104
python.sources.handle_comp_dir
def handle_comp_dir(fname, dirname)
Definition: sources.py:62
python.sources.handle_atlas_buildarea
def handle_atlas_buildarea(fname)
Definition: sources.py:88
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232