aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-06 14:04:42 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-06 14:04:42 +0000
commitaeffe1056f9ff6526d87a16ef55222899f5528f7 (patch)
tree1b7601a9135f82c14e73535c9d4a24f94d494662 /src/common/dwarf
parentWork around Windows headers #defining ERROR by renaming enum values in StackF... (diff)
downloadbreakpad-aeffe1056f9ff6526d87a16ef55222899f5528f7.tar.xz
Use stdint types everywhere
R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/dwarf')
-rw-r--r--src/common/dwarf/cfi_assembler.cc22
-rw-r--r--src/common/dwarf/cfi_assembler.h44
-rw-r--r--src/common/dwarf/dwarf2reader_cfi_unittest.cc8
-rw-r--r--src/common/dwarf/dwarf2reader_die_unittest.cc4
-rw-r--r--src/common/dwarf/dwarf2reader_test_common.h2
5 files changed, 40 insertions, 40 deletions
diff --git a/src/common/dwarf/cfi_assembler.cc b/src/common/dwarf/cfi_assembler.cc
index a6a5aca6..dbc2efae 100644
--- a/src/common/dwarf/cfi_assembler.cc
+++ b/src/common/dwarf/cfi_assembler.cc
@@ -41,10 +41,10 @@ namespace google_breakpad {
using dwarf2reader::DwarfPointerEncoding;
-CFISection &CFISection::CIEHeader(u_int64_t code_alignment_factor,
+CFISection &CFISection::CIEHeader(uint64_t code_alignment_factor,
int data_alignment_factor,
unsigned return_address_register,
- u_int8_t version,
+ uint8_t version,
const string &augmentation,
bool dwarf64) {
assert(!entry_length_);
@@ -73,8 +73,8 @@ CFISection &CFISection::CIEHeader(u_int64_t code_alignment_factor,
}
CFISection &CFISection::FDEHeader(Label cie_pointer,
- u_int64_t initial_location,
- u_int64_t address_range,
+ uint64_t initial_location,
+ uint64_t address_range,
bool dwarf64) {
assert(!entry_length_);
entry_length_ = new PendingLength();
@@ -117,7 +117,7 @@ CFISection &CFISection::FinishEntry() {
return *this;
}
-CFISection &CFISection::EncodedPointer(u_int64_t address,
+CFISection &CFISection::EncodedPointer(uint64_t address,
DwarfPointerEncoding encoding,
const EncodedPointerBases &bases) {
// Omitted data is extremely easy to emit.
@@ -131,7 +131,7 @@ CFISection &CFISection::EncodedPointer(u_int64_t address,
// Find the base address to which this pointer is relative. The upper
// nybble of the encoding specifies this.
- u_int64_t base;
+ uint64_t base;
switch (encoding & 0xf0) {
case dwarf2reader::DW_EH_PE_absptr: base = 0; break;
case dwarf2reader::DW_EH_PE_pcrel: base = bases.cfi + Size(); break;
@@ -189,10 +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;
+const uint32_t CFISection::kDwarf64InitialLengthMarker;
+const uint32_t CFISection::kDwarf32CIEIdentifier;
+const uint64_t CFISection::kDwarf64CIEIdentifier;
+const uint32_t CFISection::kEHFrame32CIEIdentifier;
+const uint64_t CFISection::kEHFrame64CIEIdentifier;
} // namespace google_breakpad
diff --git a/src/common/dwarf/cfi_assembler.h b/src/common/dwarf/cfi_assembler.h
index 00ff6f06..227812b5 100644
--- a/src/common/dwarf/cfi_assembler.h
+++ b/src/common/dwarf/cfi_assembler.h
@@ -80,14 +80,14 @@ class CFISection: public Section {
// The starting address of this CFI section in memory, for
// DW_EH_PE_pcrel. DW_EH_PE_pcrel pointers may only be used in data
// that has is loaded into the program's address space.
- u_int64_t cfi;
+ uint64_t cfi;
// The starting address of this file's .text section, for DW_EH_PE_textrel.
- u_int64_t text;
+ uint64_t text;
// The starting address of this file's .got or .eh_frame_hdr section,
// for DW_EH_PE_datarel.
- u_int64_t data;
+ uint64_t data;
};
// Create a CFISection whose endianness is ENDIANNESS, and where
@@ -133,10 +133,10 @@ class CFISection: public Section {
// Before calling this function, you will typically want to use Mark
// or Here to make a label to pass to FDEHeader that refers to this
// CIE's position in the section.
- CFISection &CIEHeader(u_int64_t code_alignment_factor,
+ CFISection &CIEHeader(uint64_t code_alignment_factor,
int data_alignment_factor,
unsigned return_address_register,
- u_int8_t version = 3,
+ uint8_t version = 3,
const string &augmentation = "",
bool dwarf64 = false);
@@ -151,8 +151,8 @@ class CFISection: public Section {
// value.) Nor does it support .debug_frame sections longer than
// 0xffffff00 bytes.
CFISection &FDEHeader(Label cie_pointer,
- u_int64_t initial_location,
- u_int64_t address_range,
+ uint64_t initial_location,
+ uint64_t address_range,
bool dwarf64 = false);
// Note the current position as the end of the last CIE or FDE we
@@ -171,7 +171,7 @@ class CFISection: public Section {
// Append ADDRESS to this section, in the appropriate size and
// endianness. Return a reference to this section.
- CFISection &Address(u_int64_t address) {
+ CFISection &Address(uint64_t address) {
Section::Append(endianness(), address_size_, address);
return *this;
}
@@ -189,26 +189,26 @@ class CFISection: public Section {
//
// (C++ doesn't let me use default arguments here, because I want to
// refer to members of *this in the default argument expression.)
- CFISection &EncodedPointer(u_int64_t address) {
+ CFISection &EncodedPointer(uint64_t address) {
return EncodedPointer(address, pointer_encoding_, encoded_pointer_bases_);
}
- CFISection &EncodedPointer(u_int64_t address, DwarfPointerEncoding encoding) {
+ CFISection &EncodedPointer(uint64_t address, DwarfPointerEncoding encoding) {
return EncodedPointer(address, encoding, encoded_pointer_bases_);
}
- CFISection &EncodedPointer(u_int64_t address, DwarfPointerEncoding encoding,
+ CFISection &EncodedPointer(uint64_t address, DwarfPointerEncoding encoding,
const EncodedPointerBases &bases);
// Restate some member functions, to keep chaining working nicely.
CFISection &Mark(Label *label) { Section::Mark(label); return *this; }
- CFISection &D8(u_int8_t v) { Section::D8(v); return *this; }
- CFISection &D16(u_int16_t v) { Section::D16(v); return *this; }
+ CFISection &D8(uint8_t v) { Section::D8(v); return *this; }
+ CFISection &D16(uint16_t v) { Section::D16(v); return *this; }
CFISection &D16(Label v) { Section::D16(v); return *this; }
- CFISection &D32(u_int32_t v) { Section::D32(v); return *this; }
+ CFISection &D32(uint32_t v) { Section::D32(v); return *this; }
CFISection &D32(const Label &v) { Section::D32(v); return *this; }
- CFISection &D64(u_int64_t v) { Section::D64(v); return *this; }
+ CFISection &D64(uint64_t v) { Section::D64(v); return *this; }
CFISection &D64(const Label &v) { Section::D64(v); return *this; }
CFISection &LEB128(long long v) { Section::LEB128(v); return *this; }
- CFISection &ULEB128(u_int64_t v) { Section::ULEB128(v); return *this; }
+ CFISection &ULEB128(uint64_t v) { Section::ULEB128(v); return *this; }
private:
// A length value that we've appended to the section, but is not yet
@@ -224,13 +224,13 @@ class CFISection: public Section {
// If the first four bytes of an "initial length" are this constant, then
// the data uses the 64-bit DWARF format, and the length itself is the
// subsequent eight bytes.
- static const u_int32_t kDwarf64InitialLengthMarker = 0xffffffffU;
+ static const uint32_t kDwarf64InitialLengthMarker = 0xffffffffU;
// The CIE identifier for 32- and 64-bit DWARF CFI and .eh_frame data.
- static const u_int32_t kDwarf32CIEIdentifier = ~(u_int32_t)0;
- static const u_int64_t kDwarf64CIEIdentifier = ~(u_int64_t)0;
- static const u_int32_t kEHFrame32CIEIdentifier = 0;
- static const u_int64_t kEHFrame64CIEIdentifier = 0;
+ static const uint32_t kDwarf32CIEIdentifier = ~(uint32_t)0;
+ static const uint64_t kDwarf64CIEIdentifier = ~(uint64_t)0;
+ static const uint32_t kEHFrame32CIEIdentifier = 0;
+ static const uint64_t kEHFrame64CIEIdentifier = 0;
// The size of a machine address for the data in this section.
size_t address_size_;
@@ -261,7 +261,7 @@ class CFISection: public Section {
// If in_fde_ is true, this is its starting address. We use this for
// emitting DW_EH_PE_funcrel pointers.
- u_int64_t fde_start_address_;
+ uint64_t fde_start_address_;
};
} // namespace google_breakpad
diff --git a/src/common/dwarf/dwarf2reader_cfi_unittest.cc b/src/common/dwarf/dwarf2reader_cfi_unittest.cc
index 7b794361..66c6198b 100644
--- a/src/common/dwarf/dwarf2reader_cfi_unittest.cc
+++ b/src/common/dwarf/dwarf2reader_cfi_unittest.cc
@@ -2326,14 +2326,14 @@ struct ELFSectionHeader {
alignment(1), entry_size(0) { }
Label name;
unsigned int type;
- u_int64_t flags;
- u_int64_t address;
+ uint64_t flags;
+ uint64_t address;
Label file_offset;
Label file_size;
unsigned int link;
unsigned int info;
- u_int64_t alignment;
- u_int64_t entry_size;
+ uint64_t alignment;
+ uint64_t entry_size;
};
void AppendSectionHeader(CFISection *table, const ELFSectionHeader &header) {
diff --git a/src/common/dwarf/dwarf2reader_die_unittest.cc b/src/common/dwarf/dwarf2reader_die_unittest.cc
index f8462a19..4e344369 100644
--- a/src/common/dwarf/dwarf2reader_die_unittest.cc
+++ b/src/common/dwarf/dwarf2reader_die_unittest.cc
@@ -289,7 +289,7 @@ TEST_P(DwarfForms, addr) {
StartSingleAttributeDIE(GetParam(), dwarf2reader::DW_TAG_compile_unit,
dwarf2reader::DW_AT_low_pc,
dwarf2reader::DW_FORM_addr);
- u_int64_t value;
+ uint64_t value;
if (GetParam().address_size == 4) {
value = 0xc8e9ffcc;
info.D32(value);
@@ -372,7 +372,7 @@ TEST_P(DwarfForms, sec_offset) {
StartSingleAttributeDIE(GetParam(), (DwarfTag) 0x1d971689,
(DwarfAttribute) 0xa060bfd1,
dwarf2reader::DW_FORM_sec_offset);
- u_int64_t value;
+ uint64_t value;
if (GetParam().format_size == 4) {
value = 0xacc9c388;
info.D32(value);
diff --git a/src/common/dwarf/dwarf2reader_test_common.h b/src/common/dwarf/dwarf2reader_test_common.h
index e46931a4..e91de906 100644
--- a/src/common/dwarf/dwarf2reader_test_common.h
+++ b/src/common/dwarf/dwarf2reader_test_common.h
@@ -97,7 +97,7 @@ class TestCompilationUnit: public google_breakpad::test_assembler::Section {
// The offset of the point in the compilation unit header immediately
// after the initial length field.
- u_int64_t post_length_offset_;
+ uint64_t post_length_offset_;
// The length of the compilation unit, not including the initial length field.
Label length_;