Skip to content
Snippets Groups Projects
Commit 172ae071 authored by Henrik Tjäder's avatar Henrik Tjäder
Browse files

Use functions and neater comments. Wrap call in try-except

parent 1f1e424e
No related branches found
No related tags found
No related merge requests found
...@@ -310,8 +310,11 @@ def posted_event_init(): ...@@ -310,8 +310,11 @@ def posted_event_init():
gdb.write('Task to call: %s \n' % ( gdb.write('Task to call: %s \n' % (
tasks[task_to_test] + "()")) tasks[task_to_test] + "()"))
# gdb.prompt_hook = prompt # gdb.prompt_hook = prompt
try:
gdb.execute('call %s' % "stub_" + gdb.execute('call %s' % "stub_" +
tasks[task_to_test] + "()") tasks[task_to_test] + "()")
except gdb.error:
print("GDB ERROR")
task_to_test = -1 task_to_test = -1
do_continue() do_continue()
...@@ -403,8 +406,10 @@ def ktest_setdata(file_index): ...@@ -403,8 +406,10 @@ def ktest_setdata(file_index):
def ktest_iterate(): def ktest_iterate():
""" Get the list of folders in current directory, sort and then grab the """
Get the list of folders in current directory, sort and then grab the
last one. last one.
""" """
global debug global debug
global autobuild global autobuild
...@@ -606,16 +611,6 @@ else: ...@@ -606,16 +611,6 @@ else:
gdb.execute("file %s" % (stm_out_folder + example_name)) gdb.execute("file %s" % (stm_out_folder + example_name))
gdb.execute("load %s" % (stm_out_folder + example_name)) gdb.execute("load %s" % (stm_out_folder + example_name))
# gdb.execute("step")
""" Run KLEE on the generated files """
# print(klee_run())
""" Break at main to set variable values """
# AddBreakpoint("main")
# MainBP("main")
# MainBP("init")
""" Tell gdb-dashboard to hide """ """ Tell gdb-dashboard to hide """
# gdb.execute("dashboard -enabled off") # gdb.execute("dashboard -enabled off")
...@@ -626,7 +621,8 @@ MainBP("idle") ...@@ -626,7 +621,8 @@ MainBP("idle")
""" Save all ktest files into an array """ """ Save all ktest files into an array """
file_list = ktest_iterate() file_list = ktest_iterate()
# print(file_list) if debug:
print(file_list)
""" Get all the tasks to jump to """ """ Get all the tasks to jump to """
tasks = tasklist_get() tasks = tasklist_get()
...@@ -641,4 +637,4 @@ and skip the stubs ...@@ -641,4 +637,4 @@ and skip the stubs
gdb.events.stop.connect(stop_event_ignore) gdb.events.stop.connect(stop_event_ignore)
""" Run until the next breakpoint """ """ Run until the next breakpoint """
gdb.execute("c") do_continue()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment