Commit 7977ec40 authored by Luke Macken's avatar Luke Macken

Control the output from gdb

parent de6bac60
......@@ -59,6 +59,10 @@ class CodeInjector(object):
self.filename,
'PyGILState_Release($1)',
]
subprocess.call('%sgdb -p %d -batch %s' % (self.gdb_prefix, self.pid,
p = subprocess.Popen('%sgdb -p %d -batch %s' % (self.gdb_prefix, self.pid,
' '.join(["-eval-command='call %s'" % cmd for cmd in gdb_cmds])),
shell=True)
shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if self.verbose:
print(out)
print(err)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment