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
Commits
9e90afed
Commit
9e90afed
authored
6 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
added findFDE(addr) api for efficiency
parent
3a620bef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/ehp.hpp
+1
-0
1 addition, 0 deletions
include/ehp.hpp
src/ehp.cpp
+9
-1
9 additions, 1 deletion
src/ehp.cpp
src/ehp_priv.hpp
+2
-0
2 additions, 0 deletions
src/ehp_priv.hpp
with
12 additions
and
1 deletion
include/ehp.hpp
+
1
−
0
View file @
9e90afed
...
...
@@ -147,6 +147,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
;
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
+
9
−
1
View file @
9e90afed
...
...
@@ -1675,8 +1675,16 @@ const shared_ptr<CIEVector_t> split_eh_frame_impl_t<ptrsize>::getCIEs() const
[](
const
cie_contents_t
<
ptrsize
>
&
a
){
return
shared_ptr
<
CIEContents_t
>
(
new
cie_contents_t
<
ptrsize
>
(
a
));});
return
ret
;
}
template
<
int
ptrsize
>
const
shared_ptr
<
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
);
}
unique_ptr
<
const
EHFrameParser_t
>
EHFrameParser_t
::
factory
(
const
string
filename
)
{
...
...
This diff is collapsed.
Click to expand it.
src/ehp_priv.hpp
+
2
−
0
View file @
9e90afed
...
...
@@ -403,6 +403,8 @@ 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
;
};
...
...
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