11 from get_inferior
import get_inferior
17 print (
'No inferior.')
19 maps = open (
'/proc/%d/maps' % inf)
21 for l
in maps.readlines():
22 if l
and l[-1] ==
'\n':
25 (lo,hi) = ll[0].
split(
'-')
30 if len(ll) >= 6
and ll[5] !=
'[heap]':
32 lib = os.path.basename (lib)
33 ipos = lib.find(
'.so')
37 gdb.execute (
"shared " + os.path.basename (lib), to_string =
True)
40 gdb.execute (
"shared " + os.path.basename (lib))
46 """Look up a shared library by address.
48 findlib ADDR will look up the shared library containing ADDR, if any.
49 If found, then its symbols will be loaded.
53 super (FindLib, self).__init__ (
"findlib", gdb.COMMAND_FILES)
56 addr =
int(arg.split()[0], 0)