Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libehp
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
libehp
Compare revisions
cda036f54b68d2eb1bfd0c0d636dad954433a3b7 to 30ad94f8eb2f18f7c5d9ca61a05d55213100bdc8
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
opensrc/libehp
Select target project
No results found
30ad94f8eb2f18f7c5d9ca61a05d55213100bdc8
Select Git revision
Branches
add_arm32
aware-sw-delivery
master
ubuntu24
Tags
CFAR_AEI
Release_1.0.0
Swap
Target
opensrc/libehp
Select target project
opensrc/libehp
1 result
cda036f54b68d2eb1bfd0c0d636dad954433a3b7
Select Git revision
Branches
add_arm32
aware-sw-delivery
master
ubuntu24
Tags
CFAR_AEI
Release_1.0.0
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
added isDefCFAOffset getter
· 30ad94f8
Jason Hiser
authored
6 years ago
30ad94f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/ehp.hpp
+2
-1
2 additions, 1 deletion
include/ehp.hpp
src/ehp.cpp
+15
-16
15 additions, 16 deletions
src/ehp.cpp
src/ehp_priv.hpp
+2
-1
2 additions, 1 deletion
src/ehp_priv.hpp
with
19 additions
and
18 deletions
include/ehp.hpp
View file @
30ad94f8
...
...
@@ -40,6 +40,7 @@ class EHProgramInstruction_t
virtual
~
EHProgramInstruction_t
()
{}
virtual
void
print
(
uint64_t
&
pc
,
int64_t
caf
=
1
)
const
=
0
;
virtual
bool
isNop
()
const
=
0
;
virtual
bool
isDefCFAOffset
()
const
=
0
;
virtual
bool
isRestoreState
()
const
=
0
;
virtual
bool
isRememberState
()
const
=
0
;
virtual
const
EHProgramInstructionByteVector_t
&
getBytes
()
const
=
0
;
...
...
@@ -164,7 +165,7 @@ class EHFrameParser_t
virtual
void
print
()
const
=
0
;
virtual
const
shared_ptr
<
FDEVector_t
>
getFDEs
()
const
=
0
;
virtual
const
shared_ptr
<
CIEVector_t
>
getCIEs
()
const
=
0
;
virtual
const
shared_ptr
<
FDEContents_t
>
findFDE
(
uint64_t
addr
)
const
=
0
;
virtual
const
FDEContents_t
*
findFDE
(
uint64_t
addr
)
const
=
0
;
static
unique_ptr
<
const
EHFrameParser_t
>
factory
(
const
string
filename
);
static
unique_ptr
<
const
EHFrameParser_t
>
factory
(
...
...
This diff is collapsed.
Click to expand it.
src/ehp.cpp
View file @
30ad94f8
...
...
@@ -692,21 +692,20 @@ bool eh_program_insn_t<ptrsize>::isNop() const
const
auto
opcode
=
program_bytes
[
0
];
const
auto
opcode_upper2
=
(
uint8_t
)(
opcode
>>
6
);
const
auto
opcode_lower6
=
(
uint8_t
)(
opcode
&
(
0x3f
));
switch
(
opcode_upper2
)
{
case
0
:
{
switch
(
opcode_lower6
)
{
case
DW_CFA_nop
:
return
true
;
}
}
}
return
false
;
return
opcode_upper2
==
0
&&
opcode_lower6
==
DW_CFA_nop
;
}
template
<
int
ptrsize
>
bool
eh_program_insn_t
<
ptrsize
>::
isDefCFAOffset
()
const
{
const
auto
opcode
=
program_bytes
[
0
];
const
auto
opcode_upper2
=
(
uint8_t
)(
opcode
>>
6
);
const
auto
opcode_lower6
=
(
uint8_t
)(
opcode
&
(
0x3f
));
return
opcode_upper2
==
0
&&
opcode_lower6
==
DW_CFA_def_cfa_offset
;
}
template
<
int
ptrsize
>
bool
eh_program_insn_t
<
ptrsize
>::
isRestoreState
()
const
{
...
...
@@ -1704,13 +1703,13 @@ const shared_ptr<CIEVector_t> split_eh_frame_impl_t<ptrsize>::getCIEs() const
}
template
<
int
ptrsize
>
const
shared_ptr
<
FDEContents_t
>
split_eh_frame_impl_t
<
ptrsize
>::
findFDE
(
uint64_t
addr
)
const
const
FDEContents_t
*
split_eh_frame_impl_t
<
ptrsize
>::
findFDE
(
uint64_t
addr
)
const
{
const
auto
tofind
=
fde_contents_t
<
ptrsize
>
(
addr
,
addr
+
1
);
const
auto
fde_it
=
fdes
.
find
(
tofind
);
const
auto
raw_ret_ptr
=
(
fde_it
==
fdes
.
end
())
?
nullptr
:
new
fde_contents_t
<
ptrsize
>
(
*
fde_it
)
;
return
shared_ptr
<
FDEContents_t
>
(
raw_ret_ptr
)
;
const
auto
raw_ret_ptr
=
(
fde_it
==
fdes
.
end
())
?
nullptr
:
&
*
fde_it
;
return
raw_ret_ptr
;
}
unique_ptr
<
const
EHFrameParser_t
>
EHFrameParser_t
::
factory
(
const
string
filename
)
...
...
This diff is collapsed.
Click to expand it.
src/ehp_priv.hpp
View file @
30ad94f8
...
...
@@ -109,6 +109,7 @@ class eh_program_insn_t : public EHProgramInstruction_t
const
uint32_t
&
max
);
bool
isNop
()
const
;
bool
isDefCFAOffset
()
const
;
bool
isRestoreState
()
const
;
bool
isRememberState
()
const
;
...
...
@@ -416,7 +417,7 @@ class split_eh_frame_impl_t : public EHFrameParser_t
virtual
const
shared_ptr
<
FDEVector_t
>
getFDEs
()
const
;
virtual
const
shared_ptr
<
CIEVector_t
>
getCIEs
()
const
;
virtual
const
shared_ptr
<
FDEContents_t
>
findFDE
(
uint64_t
addr
)
const
;
virtual
const
FDEContents_t
*
findFDE
(
uint64_t
addr
)
const
;
...
...
This diff is collapsed.
Click to expand it.