Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
llvm-epi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
Roger Ferrer
llvm-epi
Commits
1aa265d1
Commit
1aa265d1
authored
12 years ago
by
Eli Bendersky
Browse files
Options
Downloads
Patches
Plain Diff
Fix some formatting & add comments, following Eric's review
llvm-svn: 174473
parent
e7b56375
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/lib/DebugInfo/DWARFDebugFrame.cpp
+19
-12
19 additions, 12 deletions
llvm/lib/DebugInfo/DWARFDebugFrame.cpp
with
19 additions
and
12 deletions
llvm/lib/DebugInfo/DWARFDebugFrame.cpp
+
19
−
12
View file @
1aa265d1
...
...
@@ -21,16 +21,23 @@ class llvm::FrameEntry {
public:
enum
FrameKind
{
FK_CIE
,
FK_FDE
};
FrameEntry
(
FrameKind
K
,
DataExtractor
D
,
uint64_t
Offset
,
uint64_t
Length
)
:
Kind
(
K
),
Data
(
D
),
Offset
(
Offset
),
Length
(
Length
)
{}
:
Kind
(
K
),
Data
(
D
),
Offset
(
Offset
),
Length
(
Length
)
{}
FrameKind
getKind
()
const
{
return
Kind
;
}
virtual
void
dumpHeader
(
raw_ostream
&
OS
)
const
=
0
;
protected
:
const
FrameKind
Kind
;
/// \brief The data stream holding the section from which the entry was
/// parsed.
DataExtractor
Data
;
/// \brief Offset of this entry in the section.
uint64_t
Offset
;
/// \brief Entry length as specified in DWARF.
uint64_t
Length
;
};
...
...
@@ -45,8 +52,7 @@ public:
:
FrameEntry
(
FK_CIE
,
D
,
Offset
,
Length
),
Version
(
Version
),
Augmentation
(
Augmentation
),
CodeAlignmentFactor
(
CodeAlignmentFactor
),
DataAlignmentFactor
(
DataAlignmentFactor
),
ReturnAddressRegister
(
ReturnAddressRegister
)
{}
ReturnAddressRegister
(
ReturnAddressRegister
)
{}
void
dumpHeader
(
raw_ostream
&
OS
)
const
{
OS
<<
format
(
"%08x %08x %08x CIE"
,
Offset
,
Length
,
DW_CIE_ID
)
<<
"
\n
"
;
...
...
@@ -61,7 +67,9 @@ public:
static
bool
classof
(
const
FrameEntry
*
FE
)
{
return
FE
->
getKind
()
==
FK_CIE
;
}
private
:
/// The following fields are defined in section 6.4.1 of the DWARF standard v3
uint8_t
Version
;
SmallString
<
8
>
Augmentation
;
uint64_t
CodeAlignmentFactor
;
...
...
@@ -75,12 +83,11 @@ public:
// Each FDE has a CIE it's "linked to". Our FDE contains is constructed with
// an offset to the CIE (provided by parsing the FDE header). The CIE itself
// is obtained lazily once it's actually required.
FDE
(
DataExtractor
D
,
uint64_t
Offset
,
uint64_t
Length
,
int64_t
LinkedCIEOffset
,
uint64_t
InitialLocation
,
uint64_t
AddressRange
)
FDE
(
DataExtractor
D
,
uint64_t
Offset
,
uint64_t
Length
,
int64_t
LinkedCIEOffset
,
uint64_t
InitialLocation
,
uint64_t
AddressRange
)
:
FrameEntry
(
FK_FDE
,
D
,
Offset
,
Length
),
LinkedCIEOffset
(
LinkedCIEOffset
),
InitialLocation
(
InitialLocation
),
AddressRange
(
AddressRange
),
LinkedCIE
(
NULL
)
{}
LinkedCIE
(
NULL
)
{}
void
dumpHeader
(
raw_ostream
&
OS
)
const
{
OS
<<
format
(
"%08x %08x %08x FDE "
,
Offset
,
Length
,
LinkedCIEOffset
);
...
...
@@ -94,6 +101,8 @@ public:
return
FE
->
getKind
()
==
FK_FDE
;
}
private
:
/// The following fields are defined in section 6.4.1 of the DWARF standard v3
uint64_t
LinkedCIEOffset
;
uint64_t
InitialLocation
;
uint64_t
AddressRange
;
...
...
@@ -101,13 +110,11 @@ private:
};
DWARFDebugFrame
::
DWARFDebugFrame
()
{
DWARFDebugFrame
::
DWARFDebugFrame
()
{
}
DWARFDebugFrame
::~
DWARFDebugFrame
()
{
DWARFDebugFrame
::~
DWARFDebugFrame
()
{
for
(
EntryVector
::
iterator
I
=
Entries
.
begin
(),
E
=
Entries
.
end
();
I
!=
E
;
++
I
)
{
delete
*
I
;
...
...
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