author | Andreea Pavel <apavel@mozilla.com> |
Sun, 17 Nov 2019 18:22:54 +0200 | |
changeset 502497 | 7c2b637d452d37a6ce4320eef98d3d41b0d601c5 |
parent 502329 | 4def8673359ed4962794b4869019539451f78f15 |
child 502498 | 20eeab9d1782c253e1d01fe5ffb978e2db47ef01 |
push id | 114172 |
push user | dluca@mozilla.com |
push date | Tue, 19 Nov 2019 11:31:10 +0000 |
treeherder | mozilla-inbound@b5c5ba07d3db [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | backout |
bugs | 1371390 |
milestone | 72.0a1 |
backs out | da61ebbdb3a5d2991c508c610ef112aeb9d72c7f |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/toolkit/crashreporter/breakpad-client/mac/handler/dynamic_images.cc +++ b/toolkit/crashreporter/breakpad-client/mac/handler/dynamic_images.cc @@ -454,18 +454,17 @@ void ReadImageInfo(DynamicImages& images // Create an object representing this image and add it to our list. DynamicImage *new_image; new_image = new DynamicImage(&mach_header_bytes[0], header_size, info.load_address_, file_path, static_cast<uintptr_t>(info.file_mod_date_), images.task_, - images.cpu_type_, - header->cpusubtype); + images.cpu_type_); if (new_image->IsValid()) { images.image_list_.push_back(DynamicImageRef(new_image)); } else { delete new_image; } }
--- a/toolkit/crashreporter/breakpad-client/mac/handler/dynamic_images.h +++ b/toolkit/crashreporter/breakpad-client/mac/handler/dynamic_images.h @@ -109,30 +109,28 @@ uint32_t GetFileTypeFromHeader(DynamicIm class DynamicImage { public: DynamicImage(uint8_t *header, // data is copied size_t header_size, // includes load commands uint64_t load_address, string file_path, uintptr_t image_mod_date, mach_port_t task, - cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype) + cpu_type_t cpu_type) : header_(header, header + header_size), header_size_(header_size), load_address_(load_address), vmaddr_(0), vmsize_(0), slide_(0), version_(0), file_path_(file_path), file_mod_date_(image_mod_date), task_(task), - cpu_type_(cpu_type), - cpu_subtype_ (cpu_subtype) { + cpu_type_(cpu_type) { CalculateMemoryAndVersionInfo(); } // Size of mach_header plus load commands size_t GetHeaderSize() const {return header_.size();} // Full path to mach-o binary string GetFilePath() {return file_path_;} @@ -149,22 +147,19 @@ class DynamicImage { ptrdiff_t GetVMAddrSlide() const {return slide_;} // Size of the image mach_vm_size_t GetVMSize() const {return vmsize_;} // Task owning this loaded image mach_port_t GetTask() {return task_;} - // CPU type of the task and the image + // CPU type of the task cpu_type_t GetCPUType() {return cpu_type_;} - // CPU subtype of the image - cpu_type_t GetCPUSubtype() {return cpu_subtype_;} - // filetype from the Mach-O header. uint32_t GetFileType(); // Return true if the task is a 64-bit architecture. bool Is64Bit() { return (GetCPUType() & CPU_ARCH_ABI64) == CPU_ARCH_ABI64; } uint32_t GetVersion() {return version_;} // For sorting @@ -194,18 +189,17 @@ class DynamicImage { mach_vm_address_t vmaddr_; mach_vm_size_t vmsize_; ptrdiff_t slide_; uint32_t version_; // Dylib version string file_path_; // path dyld used to load the image uintptr_t file_mod_date_; // time_t of image file mach_port_t task_; - cpu_type_t cpu_type_; // CPU type of task_ and image - cpu_subtype_t cpu_subtype_; // CPU subtype of image + cpu_type_t cpu_type_; // CPU type of task_ }; //============================================================================== // DynamicImageRef is just a simple wrapper for a pointer to // DynamicImage. The reason we use it instead of a simple typedef is so // that we can use stl::sort() on a vector of DynamicImageRefs // and simple class pointers can't implement operator<(). //
--- a/toolkit/crashreporter/breakpad-client/mac/handler/minidump_generator.cc +++ b/toolkit/crashreporter/breakpad-client/mac/handler/minidump_generator.cc @@ -1327,18 +1327,17 @@ bool MinidumpGenerator::WriteModuleStrea // 3) Least significant 8 bits go to lower 16 bits of product LO uint32_t modVersion = image->GetVersion(); module->version_info.file_version_hi = 0; module->version_info.file_version_hi = modVersion >> 16; module->version_info.file_version_lo |= (modVersion & 0xff00) << 8; module->version_info.file_version_lo |= (modVersion & 0xff); } - if (!WriteCVRecord(module, image->GetCPUType(), image->GetCPUSubtype(), - name.c_str(), false)) { + if (!WriteCVRecord(module, image->GetCPUType(), name.c_str(), false)) { return false; } } else { // Getting module info in the crashed process const breakpad_mach_header *header; header = (breakpad_mach_header*)_dyld_get_image_header(index); if (!header) return false; @@ -1351,17 +1350,16 @@ bool MinidumpGenerator::WriteModuleStrea #else assert(header->magic == MH_MAGIC); if(header->magic != MH_MAGIC) return false; #endif int cpu_type = header->cputype; - int cpu_subtype = header->cpusubtype; unsigned long slide = _dyld_get_image_vmaddr_slide(index); const char* name = _dyld_get_image_name(index); const struct load_command *cmd = reinterpret_cast<const struct load_command *>(header + 1); memset(module, 0, sizeof(MDRawModule)); for (unsigned int i = 0; cmd && (i < header->ncmds); i++) { @@ -1379,17 +1377,17 @@ bool MinidumpGenerator::WriteModuleStrea module->base_of_image = seg->vmaddr + slide; module->size_of_image = static_cast<uint32_t>(seg->vmsize); module->module_name_rva = string_location.rva; bool in_memory = false; #if TARGET_OS_IPHONE in_memory = true; #endif - if (!WriteCVRecord(module, cpu_type, cpu_subtype, name, in_memory)) + if (!WriteCVRecord(module, cpu_type, name, in_memory)) return false; return true; } } cmd = reinterpret_cast<struct load_command*>((char *)cmd + cmd->cmdsize); } @@ -1416,17 +1414,17 @@ int MinidumpGenerator::FindExecutableMod return index; } } // failed - just use the first image return 0; } -bool MinidumpGenerator::WriteCVRecord(MDRawModule *module, int cpu_type, int cpu_subtype, +bool MinidumpGenerator::WriteCVRecord(MDRawModule *module, int cpu_type, const char *module_path, bool in_memory) { TypedMDRVA<MDCVInfoPDB70> cv(&writer_); // Only return the last path component of the full module path const char *module_name = strrchr(module_path, '/'); // Increment past the slash if (module_name) @@ -1449,24 +1447,24 @@ bool MinidumpGenerator::WriteCVRecord(MD // Get the module identifier unsigned char identifier[16]; bool result = false; if (in_memory) { MacFileUtilities::MachoID macho(module_path, reinterpret_cast<void *>(module->base_of_image), static_cast<size_t>(module->size_of_image)); - result = macho.UUIDCommand(cpu_type, cpu_subtype, identifier); + result = macho.UUIDCommand(cpu_type, CPU_SUBTYPE_MULTIPLE, identifier); if (!result) - result = macho.MD5(cpu_type, cpu_subtype, identifier); + result = macho.MD5(cpu_type, CPU_SUBTYPE_MULTIPLE, identifier); } if (!result) { FileID file_id(module_path); - result = file_id.MachoIdentifier(cpu_type, cpu_subtype, + result = file_id.MachoIdentifier(cpu_type, CPU_SUBTYPE_MULTIPLE, identifier); } if (result) { cv_ptr->signature.data1 = static_cast<uint32_t>(identifier[0]) << 24 | static_cast<uint32_t>(identifier[1]) << 16 | static_cast<uint32_t>(identifier[2]) << 8 |
--- a/toolkit/crashreporter/breakpad-client/mac/handler/minidump_generator.h +++ b/toolkit/crashreporter/breakpad-client/mac/handler/minidump_generator.h @@ -137,17 +137,17 @@ class MinidumpGenerator { bool GetThreadState(thread_act_t target_thread, thread_state_t state, mach_msg_type_number_t *count); bool WriteStackFromStartAddress(mach_vm_address_t start_addr, MDMemoryDescriptor *stack_location); bool WriteStack(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location); bool WriteContext(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location); - bool WriteCVRecord(MDRawModule *module, int cpu_type, int cpu_subtype, + bool WriteCVRecord(MDRawModule *module, int cpu_type, const char *module_path, bool in_memory); bool WriteModuleStream(unsigned int index, MDRawModule *module); size_t CalculateStackSize(mach_vm_address_t start_addr); int FindExecutableModule(); // Per-CPU implementations of these methods #ifdef HAS_ARM_SUPPORT bool WriteStackARM(breakpad_thread_state_data_t state,