Commit issue 140001: fixes for 64-bit build cleanups.

a=dmaclach, r=jimb


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@664 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
jimblandy
2010-08-25 00:41:25 +00:00
parent f8bca185b9
commit a453cc24f4
3 changed files with 22 additions and 22 deletions

View File

@@ -123,11 +123,11 @@ uint64 ByteReader::ReadEncodedPointer(const char *buffer,
// First, find the offset to START from the closest prior aligned
// address.
size_t skew = section_base_ & (AddressSize() - 1);
uint64_t skew = section_base_ & (AddressSize() - 1);
// Now find the offset from that aligned address to buffer.
off_t offset = skew + (buffer - buffer_base_);
uint64_t offset = skew + (buffer - buffer_base_);
// Round up to the next boundary.
size_t aligned = (offset + AddressSize() - 1) & -AddressSize();
uint64_t aligned = (offset + AddressSize() - 1) & -AddressSize();
// Convert back to a pointer.
const char *aligned_buffer = buffer_base_ + (aligned - skew);
// Finally, store the length and actually fetch the pointer.
@@ -156,7 +156,7 @@ uint64 ByteReader::ReadEncodedPointer(const char *buffer,
case DW_EH_PE_uleb128:
offset = ReadUnsignedLEB128(buffer, len);
break;
case DW_EH_PE_udata2:
offset = ReadTwoBytes(buffer);
*len = 2;

View File

@@ -85,7 +85,7 @@ class ByteReader {
//
// - If N is between 0 and 0x7f, then its unsigned LEB128
// representation is a single byte whose value is N.
//
//
// - Otherwise, its unsigned LEB128 representation is (N & 0x7f) |
// 0x80, followed by the unsigned LEB128 representation of N /
// 128, rounded towards negative infinity.
@@ -104,7 +104,7 @@ class ByteReader {
// - If N is between -0x40 and 0x3f, then its signed LEB128
// representation is a single byte whose value is N in two's
// complement.
//
//
// - Otherwise, its signed LEB128 representation is (N & 0x7f) |
// 0x80, followed by the signed LEB128 representation of N / 128,
// rounded towards negative infinity.
@@ -301,7 +301,7 @@ class ByteReader {
// Base addresses for Linux C++ exception handling data's encoded pointers.
bool have_section_base_, have_text_base_, have_data_base_;
bool have_function_base_;
size_t section_base_, text_base_, data_base_, function_base_;
uint64_t section_base_, text_base_, data_base_, function_base_;
const char *buffer_base_;
};