aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf/cfi_assembler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/dwarf/cfi_assembler.cc')
-rw-r--r--src/common/dwarf/cfi_assembler.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/common/dwarf/cfi_assembler.cc b/src/common/dwarf/cfi_assembler.cc
index 110aa2e7..50e92e5a 100644
--- a/src/common/dwarf/cfi_assembler.cc
+++ b/src/common/dwarf/cfi_assembler.cc
@@ -52,18 +52,14 @@ CFISection &CFISection::CIEHeader(u_int64_t code_alignment_factor,
in_fde_ = false;
if (dwarf64) {
- D32(0xffffffff);
+ D32(kDwarf64InitialLengthMarker);
D64(entry_length_->length);
entry_length_->start = Here();
- // Write the CIE distinguished value. In .debug_frame sections, it's
- // ~0; in .eh_frame sections, it's zero.
- D64(eh_frame_ ? 0 : ~(u_int64_t)0);
+ D64(eh_frame_ ? kEHFrame64CIEIdentifier : kDwarf64CIEIdentifier);
} else {
D32(entry_length_->length);
entry_length_->start = Here();
- // Write the CIE distinguished value. In .debug_frame sections, it's
- // ~0; in .eh_frame sections, it's zero.
- D32(eh_frame_ ? 0 : ~(u_int32_t)0);
+ D32(eh_frame_ ? kEHFrame32CIEIdentifier : kDwarf32CIEIdentifier);
}
D8(version);
AppendCString(augmentation);
@@ -193,4 +189,10 @@ CFISection &CFISection::EncodedPointer(u_int64_t address,
return *this;
};
+const u_int32_t CFISection::kDwarf64InitialLengthMarker;
+const u_int32_t CFISection::kDwarf32CIEIdentifier;
+const u_int64_t CFISection::kDwarf64CIEIdentifier;
+const u_int32_t CFISection::kEHFrame32CIEIdentifier;
+const u_int64_t CFISection::kEHFrame64CIEIdentifier;
+
} // namespace google_breakpad