Clean up build for 64 bit.

Fix up some broken mac projects.
Consolidate project settings in xcconfig files.

http://breakpad.appspot.com/130001



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@627 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
dmaclach 2010-07-19 20:43:49 +00:00
parent 786275e719
commit 4ac61acb3a
53 changed files with 1791 additions and 1084 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.
size_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.

View file

@ -90,7 +90,7 @@ void CompilationUnit::ReadAbbrevs() {
while (1) {
CompilationUnit::Abbrev abbrev;
size_t len;
const uint32 number = reader_->ReadUnsignedLEB128(abbrevptr, &len);
const uint64 number = reader_->ReadUnsignedLEB128(abbrevptr, &len);
if (number == 0)
break;
@ -98,7 +98,7 @@ void CompilationUnit::ReadAbbrevs() {
abbrevptr += len;
assert(abbrevptr < abbrev_start + abbrev_length);
const uint32 tag = reader_->ReadUnsignedLEB128(abbrevptr, &len);
const uint64 tag = reader_->ReadUnsignedLEB128(abbrevptr, &len);
abbrevptr += len;
abbrev.tag = static_cast<enum DwarfTag>(tag);
@ -109,11 +109,11 @@ void CompilationUnit::ReadAbbrevs() {
assert(abbrevptr < abbrev_start + abbrev_length);
while (1) {
const uint32 nametemp = reader_->ReadUnsignedLEB128(abbrevptr, &len);
const uint64 nametemp = reader_->ReadUnsignedLEB128(abbrevptr, &len);
abbrevptr += len;
assert(abbrevptr < abbrev_start + abbrev_length);
const uint32 formtemp = reader_->ReadUnsignedLEB128(abbrevptr, &len);
const uint64 formtemp = reader_->ReadUnsignedLEB128(abbrevptr, &len);
abbrevptr += len;
if (nametemp == 0 && formtemp == 0)
break;
@ -515,7 +515,7 @@ void CompilationUnit::ProcessDIEs() {
continue;
}
const Abbrev& abbrev = abbrevs_->at(abbrev_num);
const Abbrev& abbrev = abbrevs_->at(static_cast<size_t>(abbrev_num));
const enum DwarfTag tag = abbrev.tag;
if (!handler_->StartDIE(absolute_offset, tag, abbrev.attributes)) {
dieptr = SkipDIE(dieptr, abbrev);
@ -618,8 +618,8 @@ void LineInfo::ReadHeader() {
uint64 filelength = reader_->ReadUnsignedLEB128(lineptr, &len);
lineptr += len;
handler_->DefineFile(filename, fileindex, dirindex, mod_time,
filelength);
handler_->DefineFile(filename, fileindex, static_cast<uint32>(dirindex),
mod_time, filelength);
fileindex++;
}
}
@ -649,7 +649,7 @@ bool LineInfo::ProcessOneOpcode(ByteReader* reader,
opcode -= header.opcode_base;
const int64 advance_address = (opcode / header.line_range)
* header.min_insn_length;
const int64 advance_line = (opcode % header.line_range)
const int32 advance_line = (opcode % header.line_range)
+ header.line_base;
// Check if the lsm passes "pc". If so, mark it as passed.
@ -689,7 +689,7 @@ bool LineInfo::ProcessOneOpcode(ByteReader* reader,
case DW_LNS_advance_line: {
const int64 advance_line = reader->ReadSignedLEB128(start, &templen);
oplen += templen;
lsm->line_num += advance_line;
lsm->line_num += static_cast<int32>(advance_line);
// With gcc 4.2.1, we can get the line_no here for the first time
// since DW_LNS_advance_line is called after DW_LNE_set_address is
@ -703,13 +703,13 @@ bool LineInfo::ProcessOneOpcode(ByteReader* reader,
case DW_LNS_set_file: {
const uint64 fileno = reader->ReadUnsignedLEB128(start, &templen);
oplen += templen;
lsm->file_num = fileno;
lsm->file_num = static_cast<uint32>(fileno);
}
break;
case DW_LNS_set_column: {
const uint64 colno = reader->ReadUnsignedLEB128(start, &templen);
oplen += templen;
lsm->column_num = colno;
lsm->column_num = static_cast<uint32>(colno);
}
break;
case DW_LNS_negate_stmt: {
@ -748,7 +748,7 @@ bool LineInfo::ProcessOneOpcode(ByteReader* reader,
}
break;
case DW_LNS_extended_op: {
const size_t extended_op_len = reader->ReadUnsignedLEB128(start,
const uint64 extended_op_len = reader->ReadUnsignedLEB128(start,
&templen);
start += templen;
oplen += templen + extended_op_len;
@ -790,8 +790,8 @@ bool LineInfo::ProcessOneOpcode(ByteReader* reader,
oplen += templen;
if (handler) {
handler->DefineFile(filename, -1, dirindex, mod_time,
filelength);
handler->DefineFile(filename, -1, static_cast<uint32>(dirindex),
mod_time, filelength);
}
}
break;
@ -803,7 +803,6 @@ bool LineInfo::ProcessOneOpcode(ByteReader* reader,
// Ignore unknown opcode silently
if (header.std_opcode_lengths) {
for (int i = 0; i < (*header.std_opcode_lengths)[opcode]; i++) {
size_t templen;
reader->ReadUnsignedLEB128(start, &templen);
start += templen;
oplen += templen;
@ -1940,7 +1939,7 @@ bool CallFrameInfo::ReadCIEFields(CIE *cie) {
// If we have a 'z' augmentation string, find the augmentation data and
// use the augmentation string to parse it.
if (cie->has_z_augmentation) {
size_t data_size = reader_->ReadUnsignedLEB128(cursor, &len);
uint64_t data_size = reader_->ReadUnsignedLEB128(cursor, &len);
if (size_t(cie->end - cursor) < len + data_size)
return ReportIncomplete(cie);
cursor += len;
@ -2060,7 +2059,7 @@ bool CallFrameInfo::ReadFDEFields(FDE *fde) {
// If the CIE has a 'z' augmentation string, then augmentation data
// appears here.
if (fde->cie->has_z_augmentation) {
size_t data_size = reader_->ReadUnsignedLEB128(cursor, &size);
uint64_t data_size = reader_->ReadUnsignedLEB128(cursor, &size);
if (size_t(fde->end - cursor) < size + data_size)
return ReportIncomplete(fde);
cursor += size;

View file

@ -242,7 +242,7 @@ class CompilationUnit {
// The abbreviation tells how to read a DWARF2/3 DIE, and consist of a
// tag and a list of attributes, as well as the data form of each attribute.
struct Abbrev {
uint32 number;
uint64 number;
enum DwarfTag tag;
bool has_children;
AttributeList attributes;

View file

@ -48,7 +48,7 @@ struct LineStateMachine {
uint32 file_num;
uint64 address;
uint64 line_num;
uint32 line_num;
uint32 column_num;
bool is_stmt; // stmt means statement.
bool basic_block;