| OLD | NEW |
| 1 // Copyright (c) 2009, Google Inc. | 1 // Copyright (c) 2009, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 | 547 |
| 548 my_memset(signature, 0, sizeof(xor_buf)); | 548 my_memset(signature, 0, sizeof(xor_buf)); |
| 549 while (done < 4096) { | 549 while (done < 4096) { |
| 550 dumper_.CopyFromProcess(xor_buf, crashing_tid_, | 550 dumper_.CopyFromProcess(xor_buf, crashing_tid_, |
| 551 (void *) (mod.base_of_image + done), | 551 (void *) (mod.base_of_image + done), |
| 552 sizeof(xor_buf)); | 552 sizeof(xor_buf)); |
| 553 for (unsigned i = 0; i < sizeof(xor_buf); ++i) | 553 for (unsigned i = 0; i < sizeof(xor_buf); ++i) |
| 554 signature[i] ^= xor_buf[i]; | 554 signature[i] ^= xor_buf[i]; |
| 555 done += sizeof(xor_buf); | 555 done += sizeof(xor_buf); |
| 556 } | 556 } |
| 557 cv_ptr += sizeof(uint32_t); // Skip age field | 557 my_memset(cv_ptr, 0, sizeof(uint32_t)); // Set age to 0 on Linux. |
| 558 cv_ptr += sizeof(uint32_t); |
| 558 } | 559 } |
| 559 | 560 |
| 560 // Write pdb_file_name | 561 // Write pdb_file_name |
| 561 memcpy(cv_ptr, filename_ptr, filename_len + 1); | 562 memcpy(cv_ptr, filename_ptr, filename_len + 1); |
| 562 cv.Copy(cv_buf, MDCVInfoPDB70_minsize + filename_len + 1); | 563 cv.Copy(cv_buf, MDCVInfoPDB70_minsize + filename_len + 1); |
| 563 | 564 |
| 564 mod.cv_record = cv.location(); | 565 mod.cv_record = cv.location(); |
| 565 | 566 |
| 566 MDLocationDescriptor ld; | 567 MDLocationDescriptor ld; |
| 567 if (!minidump_writer_.WriteString(mapping.name, filepath_len, &ld)) | 568 if (!minidump_writer_.WriteString(mapping.name, filepath_len, &ld)) |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 return false; | 853 return false; |
| 853 const ExceptionHandler::CrashContext* context = | 854 const ExceptionHandler::CrashContext* context = |
| 854 reinterpret_cast<const ExceptionHandler::CrashContext*>(blob); | 855 reinterpret_cast<const ExceptionHandler::CrashContext*>(blob); |
| 855 MinidumpWriter writer(filename, crashing_process, context); | 856 MinidumpWriter writer(filename, crashing_process, context); |
| 856 if (!writer.Init()) | 857 if (!writer.Init()) |
| 857 return false; | 858 return false; |
| 858 return writer.Dump(); | 859 return writer.Dump(); |
| 859 } | 860 } |
| 860 | 861 |
| 861 } // namespace google_breakpad | 862 } // namespace google_breakpad |
| OLD | NEW |