Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Liew
klee-cl
Commits
31242269
Commit
31242269
authored
Oct 16, 2013
by
Daniel Liew
Browse files
Added capability to klee-control to switch printing of instructions
on/off
parent
0b988aa7
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/klee-control
View file @
31242269
#!/usr/bin/python
#!/usr/bin/
env
python
2.7
import
os
,
signal
,
popen2
...
...
@@ -15,6 +15,7 @@ def execCmd(pid, gdbCmd, opts):
"--pid=%d "
+
"--eval-command=
\"
%s
\"
"
+
"--eval-command=detach"
)
%
(
pid
,
gdbCmd
)
print
(
"Sending command: "
+
cmd
)
cout
,
cin
=
popen2
.
popen2
(
cmd
)
cin
.
close
()
return
cout
.
read
()
...
...
@@ -40,6 +41,10 @@ def main():
action
=
'store_true'
,
default
=
False
)
op
.
add_option
(
''
,
'--print-ticks'
,
dest
=
'printTicks'
,
action
=
'store_true'
,
default
=
False
)
op
.
add_option
(
'-p'
,
'--set-print-instr'
,
action
=
'store'
,
choices
=
[
'true'
,
'false'
],
default
=
None
,
dest
=
'setDebugPrintInstructions'
,
help
=
'Enable or disable printing of instructions in KLEE. Set to true or false'
)
opts
,
args
=
op
.
parse_args
()
if
len
(
args
)
!=
1
:
...
...
@@ -83,6 +88,9 @@ def main():
os
.
kill
(
pid
,
signal
.
SIGINT
)
if
opts
.
kill
:
os
.
kill
(
pid
,
signal
.
SIGKILL
)
if
opts
.
setDebugPrintInstructions
:
execCmd
(
pid
,
'set DebugPrintInstructions.Value = '
+
opts
.
setDebugPrintInstructions
,
opts
)
if
__name__
==
'__main__'
:
main
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment