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
KLEE
cortex-m-rtfm-klee
Commits
1f1e424e
Commit
1f1e424e
authored
Mar 7, 2018
by
Henrik Tjäder
Browse files
Options
Downloads
Patches
Plain Diff
Continue through the stubs without any action
parent
93e2c898
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
+28
-12
28 additions, 12 deletions
klee_stm_gdb.py
with
28 additions
and
12 deletions
klee_stm_gdb.py
+
28
−
12
View file @
1f1e424e
...
...
@@ -118,7 +118,6 @@ class MainBP(gdb.Breakpoint):
print
(
"
Breakpoint location: %s
"
%
self
.
location
)
if
self
.
location
==
"
idle
"
:
print
(
"
Reached IDLE
"
)
"""
When reaching idle() it means all the stubs
has been executed and finished.
...
...
@@ -133,6 +132,17 @@ class MainBP(gdb.Breakpoint):
gdb_cyccnt_enable
()
gdb_cyccnt_reset
()
"""
Subscribe stop_event to Breakpoint notifications
and unsubscripe the stop_event_ignore
"""
if
not
init_done
:
gdb
.
events
.
stop
.
disconnect
(
stop_event_ignore
)
init_done
=
1
gdb
.
events
.
stop
.
connect
(
stop_event
)
enable_output
=
1
gdb
.
prompt_hook
=
prompt
return
True
...
...
@@ -146,7 +156,14 @@ class MainBP(gdb.Breakpoint):
# return False
# Subscribing to the stop events
def
stop_event_ignore
(
evt
):
"""
Ignore this breakpoint
"""
do_continue
()
def
stop_event
(
evt
):
# print("#### stop event")
# print("evt %r" % evt)
...
...
@@ -222,6 +239,9 @@ def stop_event(evt):
outputdata
.
append
([
file_name
,
task_name
,
cyccnt
,
ceiling
,
action
])
print
(
"
CYCCNT: %s
\n
Ceiling: %s
"
%
(
cyccnt
,
outputdata
[
-
1
][
3
]))
# gdb.post_event(posted_event_init)
do_continue
()
...
...
@@ -247,11 +267,6 @@ def posted_event_init():
"""
"""
Subscribe stop_event to Breakpoint notifications
"""
gdb
.
events
.
stop
.
connect
(
stop_event
)
print
(
"
Entering posted_event_init
"
)
global
init_done
...
...
@@ -273,7 +288,7 @@ def posted_event_init():
print
(
"
Nothing to call...
"
)
init_done
=
0
file_index_current
+=
1
gdb
.
post_event
(
posted_event_init
)
#
gdb.post_event(posted_event_init)
# gdb.post_event(gather_data)
return
...
...
@@ -301,7 +316,8 @@ def posted_event_init():
task_to_test
=
-
1
do_continue
()
else
:
print
(
"
Done else
"
)
print
(
"
Error: Index out of range
"
)
sys
.
exit
(
1
)
def
gather_data
():
...
...
@@ -315,7 +331,6 @@ def gather_data():
If not all ktest-files done yet, proceed
"""
if
file_index_current
<
len
(
file_list
):
init_done
=
0
file_index_current
+=
1
# print("Current file: %s" % file_list[file_index_current])
gdb
.
post_event
(
posted_event_init
)
...
...
@@ -620,9 +635,10 @@ for t in tasks:
print
(
t
)
"""
Subscribe stop_event to Breakpoint notifications
Subscribe stop_event_ignore to Breakpoint notifications
and skip the stubs
"""
gdb
.
events
.
stop
.
connect
(
stop_event
)
gdb
.
events
.
stop
.
connect
(
stop_event
_ignore
)
"""
Run until the next breakpoint
"""
gdb
.
execute
(
"
c
"
)
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