Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Open Source Software
Zipr Toolchain
Commits
37b7496e
Commit
37b7496e
authored
6 years ago
by
Clark Coleman
Browse files
Options
Downloads
Patches
Plain Diff
Fix annotation parsing for memory range annotations.
Former-commit-id: 41fa07d22ca3edef70568823572ee62eda413ef2
parent
d2027ddf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libMEDSannotation/src/MEDS_AnnotationParser.cpp
+2
-1
2 additions, 1 deletion
libMEDSannotation/src/MEDS_AnnotationParser.cpp
libMEDSannotation/src/MEDS_MemoryRangeAnnotation.cpp
+23
-4
23 additions, 4 deletions
libMEDSannotation/src/MEDS_MemoryRangeAnnotation.cpp
with
25 additions
and
5 deletions
libMEDSannotation/src/MEDS_AnnotationParser.cpp
+
2
−
1
View file @
37b7496e
...
...
@@ -32,6 +32,7 @@
#include
"MEDS_DeadRegAnnotation.hpp"
#include
"MEDS_IBAnnotation.hpp"
#include
"MEDS_IBTAnnotation.hpp"
#include
"MEDS_MemoryRangeAnnotation.hpp"
// @todo: multiple annotation per instruction
...
...
@@ -104,7 +105,7 @@ void MEDS_AnnotationParser::parseFile(istream &p_inputStream)
if
(
add_if_valid
<
MEDS_FuncExitAnnotation
>
(
line
))
continue
;
if
(
add_if_valid
<
MEDS_IBAnnotation
>
(
line
))
continue
;
if
(
add_if_valid
<
MEDS_IBTAnnotation
>
(
line
))
continue
;
if
(
add_if_valid
<
MEDS_MemoryRangeAnnotation
>
(
line
))
continue
;
}
}
...
...
This diff is collapsed.
Click to expand it.
libMEDSannotation/src/MEDS_MemoryRangeAnnotation.cpp
+
23
−
4
View file @
37b7496e
...
...
@@ -23,7 +23,7 @@
#include
<cstdio>
#include
<string>
#include
<string.h>
#include
<c
std
int>
#include
<cint
types
>
#include
"MEDS_MemoryRangeAnnotation.hpp"
...
...
@@ -87,11 +87,30 @@ void MEDS_MemoryRangeAnnotation::parse()
// 417748 12 INSTR STATICMEMWRITE MIN 3c60320 LIMIT 4e53730 ZZ
// 4992ea 4 INSTR STACKMEMRANGE MIN RSP - 568 LIMIT RSP - 48 INSTRSPDELTA - 592 ZZ
int
ItemsFilled
=
sscanf
(
m_rawInputLine
.
c_str
(),
"%*x %d %*s %*s MIN %lx LIMIT %lx"
,
&
instrSize
,
&
MinVal
,
&
LimitVal
);
if
(
3
!=
ItemsFilled
)
{
if
(
this
->
isStaticGlobalRange
())
{
int
ItemsFilled
=
sscanf
(
m_rawInputLine
.
c_str
(),
"%*x %d %*s %*s MIN %"
SCNx64
" LIMIT %"
SCNx64
,
&
instrSize
,
&
MinVal
,
&
LimitVal
);
if
(
3
!=
ItemsFilled
)
{
this
->
setInvalid
();
cerr
<<
"Error on sscanf of annotation: ItemsFilled = "
<<
ItemsFilled
<<
" line: "
<<
m_rawInputLine
<<
endl
;
return
;
}
else
{
cerr
<<
"Parsed STATICMEMWRITE annotation: MIN = "
<<
hex
<<
MinVal
<<
" LIMIT = "
<<
LimitVal
<<
endl
;
}
}
else
{
#if 0
int ItemsFilled = sscanf(m_rawInputLine.c_str(), "%*x %d %*s %*s MIN %" SCNx64 " LIMIT %" SCNx64, &instrSize, &MinVal, &LimitVal);
if (3 != ItemsFilled) {
this->setInvalid();
cerr << "Error on sscanf of annotation: ItemsFilled = " << ItemsFilled << " line: " << m_rawInputLine << endl;
return;
}
#else
this
->
setInvalid
();
cerr
<<
"
Error on sscanf of
annotation"
<<
endl
;
cerr
<<
"
Not yet parsing STACKMEMRANGE
annotation
s
"
<<
endl
;
return
;
#endif
}
this
->
setInstructionSize
(
instrSize
);
// in base class
...
...
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