Several fixes for broken Mac build

This commit is contained in:
Roman Margold 2017-02-01 08:33:44 -08:00
parent 7c2799f3ba
commit 5c521532fc
4 changed files with 10 additions and 11 deletions

View File

@ -836,7 +836,7 @@ class MinidumpUnloadedModuleList : public MinidumpStream,
const MinidumpUnloadedModule* const MinidumpUnloadedModule*
GetModuleAtIndex(unsigned int index) const override; GetModuleAtIndex(unsigned int index) const override;
const CodeModules* Copy() const override; const CodeModules* Copy() const override;
vector<linked_ptr<const CodeModule>> GetShrunkRangeModules() const override; vector<linked_ptr<const CodeModule> > GetShrunkRangeModules() const override;
bool IsModuleShrinkEnabled() const override; bool IsModuleShrinkEnabled() const override;
protected: protected:
@ -850,7 +850,7 @@ class MinidumpUnloadedModuleList : public MinidumpStream,
static const uint32_t kStreamType = MD_UNLOADED_MODULE_LIST_STREAM; static const uint32_t kStreamType = MD_UNLOADED_MODULE_LIST_STREAM;
bool Read(uint32_t expected_size_); bool Read(uint32_t expected_size_) override;
// The largest number of modules that will be read from a minidump. The // The largest number of modules that will be read from a minidump. The
// default is 1024. // default is 1024.

View File

@ -3885,7 +3885,7 @@ const CodeModules* MinidumpUnloadedModuleList::Copy() const {
return new BasicCodeModules(this); return new BasicCodeModules(this);
} }
vector<linked_ptr<const CodeModule>> vector<linked_ptr<const CodeModule> >
MinidumpUnloadedModuleList::GetShrunkRangeModules() const { MinidumpUnloadedModuleList::GetShrunkRangeModules() const {
return vector<linked_ptr<const CodeModule> >(); return vector<linked_ptr<const CodeModule> >();
} }

View File

@ -56,8 +56,8 @@ StackwalkerMIPS::StackwalkerMIPS(const SystemInfo* system_info,
: Stackwalker(system_info, memory, modules, resolver_helper), : Stackwalker(system_info, memory, modules, resolver_helper),
context_(context) { context_(context) {
if (context_->context_flags & MD_CONTEXT_MIPS64 ) { if (context_->context_flags & MD_CONTEXT_MIPS64 ) {
if ((memory_ && memory_->GetBase() + memory_->GetSize() - 1) if (memory_ && ((memory_->GetBase() + memory_->GetSize() - 1)
> 0xffffffffffffffff) { > 0xffffffffffffffff)) {
BPLOG(ERROR) << "Memory out of range for stackwalking mips64: " BPLOG(ERROR) << "Memory out of range for stackwalking mips64: "
<< HexString(memory_->GetBase()) << HexString(memory_->GetBase())
<< "+" << "+"
@ -65,7 +65,7 @@ StackwalkerMIPS::StackwalkerMIPS(const SystemInfo* system_info,
memory_ = NULL; memory_ = NULL;
} }
} else { } else {
if ((memory_ && memory_->GetBase() + memory_->GetSize() - 1) > 0xffffffff) { if (memory_ && ((memory_->GetBase() + memory_->GetSize() - 1) > 0xffffffff)) {
BPLOG(ERROR) << "Memory out of range for stackwalking mips32: " BPLOG(ERROR) << "Memory out of range for stackwalking mips32: "
<< HexString(memory_->GetBase()) << HexString(memory_->GetBase())
<< "+" << "+"

View File

@ -140,13 +140,12 @@ void DumpFile(const char *filename) {
size_t object_files_size; size_t object_files_size;
const SuperFatArch* super_fat_object_files = const SuperFatArch* super_fat_object_files =
fat_reader.object_files(&object_files_size); fat_reader.object_files(&object_files_size);
struct fat_arch *object_files;
if (!super_fat_object_files->ConvertToFatArch(object_files)) {
exit(1);
}
printf(" object file count: %ld\n", object_files_size); printf(" object file count: %ld\n", object_files_size);
for (size_t i = 0; i < object_files_size; i++) { for (size_t i = 0; i < object_files_size; i++) {
const struct fat_arch &file = object_files[i]; struct fat_arch file;
if (!super_fat_object_files->ConvertToFatArch(&file)) {
exit(1);
}
const NXArchInfo *fat_arch_info = const NXArchInfo *fat_arch_info =
google_breakpad::BreakpadGetArchInfoFromCpuType( google_breakpad::BreakpadGetArchInfoFromCpuType(
file.cputype, file.cpusubtype); file.cputype, file.cpusubtype);