Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
c18e9b55
Commit
c18e9b55
authored
3 years ago
by
Maxime Jacquemin
Browse files
Options
Downloads
Patches
Plain Diff
[ivette] Better handling of selected callstack
parent
520b966f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ivette/src/frama-c/plugins/eva/valuetable.tsx
+25
-1
25 additions, 1 deletion
ivette/src/frama-c/plugins/eva/valuetable.tsx
with
25 additions
and
1 deletion
ivette/src/frama-c/plugins/eva/valuetable.tsx
+
25
−
1
View file @
c18e9b55
...
...
@@ -805,6 +805,11 @@ class FunctionsManager {
return
infos
;
}
isEmpty
(
fct
:
string
):
boolean
{
const
infos
=
this
.
cache
.
get
(
fct
);
return
infos
?
infos
.
isEmpty
()
:
true
;
}
setByCallstacks
(
fct
:
string
,
byCallstacks
:
boolean
):
void
{
const
infos
=
this
.
cache
.
get
(
fct
);
if
(
!
infos
)
return
;
...
...
@@ -910,6 +915,20 @@ function EvaTable(): JSX.Element {
const
getCallsites
=
useCallsitesCache
();
const
getCallstacks
=
useCallstacksCache
();
/* Computing the function corresponding to the selected callstack */
const
csFctPromise
=
React
.
useMemo
(
async
()
=>
{
const
selectedCSInfos
=
await
getCallsites
(
cs
);
if
(
selectedCSInfos
.
length
===
0
)
return
undefined
;
else
return
selectedCSInfos
[
0
].
callee
;
},
[
cs
,
getCallsites
]);
const
{
result
:
csFct
}
=
Dome
.
usePromise
(
csFctPromise
);
/* Reset the selected callstack when the corresponding function is removed */
React
.
useEffect
(()
=>
{
if
(
csFct
&&
fcts
.
isEmpty
(
csFct
)
&&
focus
?.
fct
!==
csFct
)
setCS
(
'
Summary
'
);
});
/* Updated the focused Probe when the selection changes. Also emit on the
* `locEvent` event. */
React
.
useEffect
(()
=>
{
...
...
@@ -975,10 +994,15 @@ function EvaTable(): JSX.Element {
fcts
.
changeStartingCallstack
(
fct
,
n
);
setTic
(
tac
+
1
);
};
const
close
=
():
void
=>
{
fcts
.
delete
(
fct
);
if
(
csFct
===
fct
)
setCS
(
'
Summary
'
);
setTic
(
tac
+
1
);
};
return
{
fct
,
markers
:
infos
.
markers
(
focus
),
close
:
()
=>
{
fcts
.
delete
(
fct
);
setTic
(
tac
+
1
);
}
,
close
,
pinProbe
:
setLocPin
,
getProbe
,
selectProbe
:
setFocus
,
...
...
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