Commit 60904007 authored by Daniel Liew's avatar Daniel Liew
Browse files

fix trailing spaces on end of lines.

parent 31242269
......@@ -19,7 +19,7 @@ def execCmd(pid, gdbCmd, opts):
cout,cin = popen2.popen2(cmd)
cin.close()
return cout.read()
def main():
from optparse import OptionParser
op = OptionParser("usage: %prog <PID | test directory>")
......@@ -60,22 +60,22 @@ def main():
pid = getPID(args[0])
except:
pid = None
if pid is None:
op.error("unable to determine PID (bad pid or test directory)")
if opts.printPid:
print pid
return
print 'pid: %d'%pid
print 'pid: %d'%pid
if opts.backtrace:
execCmd(pid, 'bt', opts)
if opts.dumpStates:
execCmd(pid, "p dumpStates = 1", opts)
execCmd(pid, "p dumpStates = 1", opts)
if opts.dumpTree:
execCmd(pid, "p dumpPTree = 1", opts)
execCmd(pid, "p dumpPTree = 1", opts)
if opts.stopForking:
execCmd(pid, 'p stop_forking()', opts)
execCmd(pid, 'p stop_forking()', opts)
if opts.haltExecution:
execCmd(pid, 'p halt_execution()', opts)
if opts.printTicks:
......@@ -84,9 +84,9 @@ def main():
for ln in lns:
if ln.startswith('$1') and '=' in ln:
print ln.split('=',1)[1].strip()
if opts.int:
if opts.int:
os.kill(pid, signal.SIGINT)
if opts.kill:
if opts.kill:
os.kill(pid, signal.SIGKILL)
if opts.setDebugPrintInstructions:
execCmd(pid, 'set DebugPrintInstructions.Value = ' +
......
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