10 p
= subprocess
.Popen("gdb -batch -x /dev/stdin",
13 stdin
=subprocess
.PIPE
,
14 stdout
=subprocess
.PIPE
,
17 (child_stdin
, child_stdout
) = (p
.stdin
, p
.stdout
)
18 child_stdin
.write("set sharedlibrary preload-libraries no\n")
19 child_stdin
.write("file "+filename
+"\n")
20 child_stdin
.write("info line *"+address
+"\n")
21 result
=child_stdout
.readline()
25 match
=re
.compile('Line (.+) of "(.+)" starts at').match(result
)
27 answer
=match
.group(2)+":"+match
.group(1)