ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
python
findlib
Classes
|
Functions
python.findlib Namespace Reference
Classes
class
FindLib
Functions
findlib
(addr, quiet=
False
)
Function Documentation
◆
findlib()
findlib
(
addr
,
quiet
=
False
)
Definition at line
14
of file
findlib.py
.
14
def
findlib (addr, quiet = False):
15
inf = get_inferior()
16
if
inf
is
None
:
17
print
(
'No inferior.'
)
18
return
19
maps = open (
'/proc/%d/maps'
% inf)
20
loaded_lib =
None
21
for
l
in
maps.readlines():
22
if
l
and
l[-1] ==
'\n'
:
23
l = l[:-1]
24
ll = l.split()
25
(lo,hi) = ll[0].
split
(
'-'
)
26
lo = int(lo, 16)
27
hi = int(hi, 16)
28
lib =
None
29
if
lo <= addr < hi:
30
if
len(ll) >= 6
and
ll[5] !=
'[heap]'
:
31
lib = ll[5]
32
lib = os.path.basename (lib)
33
ipos = lib.find(
'.so'
)
34
if
ipos > 0:
35
lib = lib[:ipos+3]
36
if
quiet:
37
gdb.execute (
"shared "
+ os.path.basename (lib), to_string =
True
)
38
else
:
39
print
(lib)
40
gdb.execute (
"shared "
+ os.path.basename (lib))
41
loaded_lib = lib
42
return
loaded_lib
43
44
split
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition
hcg.cxx:179
Generated on
for ATLAS Offline Software by
1.17.0