Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cortex-m-rtfm-klee
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Samuel Karlsson
cortex-m-rtfm-klee
Commits
1be03462
Commit
1be03462
authored
Mar 4, 2018
by
Henrik Tjäder
Browse files
Options
Downloads
Patches
Plain Diff
Reordering and some cleanup
parent
edc46b48
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
klee_stm_gdb.py
+17
-18
17 additions, 18 deletions
klee_stm_gdb.py
with
17 additions
and
18 deletions
klee_stm_gdb.py
+
17
−
18
View file @
1be03462
...
...
@@ -141,7 +141,6 @@ def stop_event(evt):
global
file_index_current
global
file_list
cyccnt
=
gdb_cyccnt_read
()
file_name
=
file_list
[
file_index_current
].
split
(
'
/
'
)[
-
1
]
"""
Get the current ceiling level, cast it to an integer
...
...
@@ -155,7 +154,7 @@ def stop_event(evt):
If there is no ceiling, it means we have returned to main
since every claim have ceiling
"""
# gdb.events.stop.disconnect(stop_event
)
cyccnt
=
gdb_cyccnt_read
(
)
outputdata
.
append
([
file_name
,
task_name
,
cyccnt
,
0
,
"
Finish
"
])
gdb_cyccnt_reset
()
...
...
@@ -166,13 +165,12 @@ def stop_event(evt):
print
(
"
\n
Finished all ktest files!
\n
"
)
print
(
"
Claims:
"
)
for
index
,
obj
in
enumerate
(
outputdata
):
if
obj
[
4
]
==
'
Exit
'
:
if
obj
[
4
]
==
"
Exit
"
:
claim_time
=
(
obj
[
2
]
-
outputdata
[
index
-
(
offset
)][
2
])
# print("Claim time: %s" % claim_time)
print
(
"
%s Claim time: %s
"
%
(
obj
,
claim_time
))
offset
+=
2
elif
obj
[
4
]
==
'
Finish
'
and
not
obj
[
2
]
==
0
:
elif
obj
[
4
]
==
"
Finish
"
and
not
obj
[
2
]
==
0
:
offset
=
1
tot_time
=
obj
[
2
]
print
(
"
%s Total time: %s
"
%
(
obj
,
tot_time
))
...
...
@@ -183,8 +181,6 @@ def stop_event(evt):
return
print
(
"
CYCCNT: %s
\n
Ceiling: %s
"
%
(
cyccnt
,
outputdata
[
-
1
][
3
]))
"""
If outputdata is empty, we start
If the same ceiling as previously: exit
...
...
@@ -197,12 +193,10 @@ def stop_event(evt):
else
:
action
=
"
Enter
"
cyccnt
=
gdb_cyccnt_read
()
outputdata
.
append
([
file_name
,
task_name
,
cyccnt
,
ceiling
,
action
])
"""
Prepare a prompt for do_continue()
"""
gdb
.
prompt_hook
=
prompt
print
(
"
CYCCNT: %s
\n
Ceiling: %s
"
%
(
cyccnt
,
outputdata
[
-
1
][
3
]))
do_continue
()
...
...
@@ -235,6 +229,7 @@ def posted_event_init():
# print("Entering posted_event_init")
global
init_done
global
tasks
global
task_to_test
global
task_name
...
...
@@ -245,6 +240,16 @@ def posted_event_init():
"""
Load the variable data
"""
ktest_setdata
(
file_index_current
)
"""
If the number of the task is greater than the available tasks just finish
"""
if
task_to_test
>
len
(
tasks
):
print
(
"
Nothing to call...
"
)
init_done
=
0
file_index_current
+=
1
gdb
.
post_event
(
posted_event_init
)
return
"""
Prepare the cycle counter
"""
...
...
@@ -253,15 +258,9 @@ def posted_event_init():
# print("Tasks: ", tasks)
# print("Name of task to test:", tasks[task_to_test])
if
task_to_test
>
len
(
tasks
):
print
(
"
Nothing to call...
"
)
do_continue
()
return
if
not
task_to_test
==
-
1
:
task_name
=
tasks
[
task_to_test
]
file_name
=
file_list
[
file_index_current
].
split
(
'
/
'
)[
-
1
]
task_name
=
tasks
[
task_to_test
]
outputdata
.
append
([
file_name
,
task_name
,
0
,
0
,
"
Start
"
])
gdb
.
write
(
'
Task to call: %s
\n
'
%
(
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment