Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1537)

Side by Side Diff: client/linux/microdump_writer/microdump_writer.cc

Issue 1189823002: Update breakpad for Android packed relocations. (Closed) Base URL: https://chromium.googlesource.com/external/google-breakpad/src.git@master
Patch Set: Update for more review comments. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | client/linux/minidump_writer/linux_dumper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, Google Inc. 1 // Copyright (c) 2014, 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 ~MicrodumpWriter() { dumper_->ThreadsResume(); } 80 ~MicrodumpWriter() { dumper_->ThreadsResume(); }
81 81
82 bool Init() { 82 bool Init() {
83 // In the exceptional case where the system was out of memory and there 83 // In the exceptional case where the system was out of memory and there
84 // wasn't even room to allocate the line buffer, bail out. There is nothing 84 // wasn't even room to allocate the line buffer, bail out. There is nothing
85 // useful we can possibly achieve without the ability to Log. At least let's 85 // useful we can possibly achieve without the ability to Log. At least let's
86 // try to not crash. 86 // try to not crash.
87 if (!dumper_->Init() || !log_line_) 87 if (!dumper_->Init() || !log_line_)
88 return false; 88 return false;
89 return dumper_->ThreadsSuspend(); 89 return dumper_->ThreadsSuspend() && dumper_->LateInit();
90 } 90 }
91 91
92 bool Dump() { 92 bool Dump() {
93 bool success; 93 bool success;
94 LogLine("-----BEGIN BREAKPAD MICRODUMP-----"); 94 LogLine("-----BEGIN BREAKPAD MICRODUMP-----");
95 DumpProductInformation(); 95 DumpProductInformation();
96 DumpOSInformation(); 96 DumpOSInformation();
97 success = DumpCrashingThread(); 97 success = DumpCrashingThread();
98 if (success) 98 if (success)
99 success = DumpMappings(); 99 success = DumpMappings();
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 dumper.set_crash_thread(context->tid); 414 dumper.set_crash_thread(context->tid);
415 } 415 }
416 MicrodumpWriter writer(context, mappings, build_fingerprint, product_info, 416 MicrodumpWriter writer(context, mappings, build_fingerprint, product_info,
417 &dumper); 417 &dumper);
418 if (!writer.Init()) 418 if (!writer.Init())
419 return false; 419 return false;
420 return writer.Dump(); 420 return writer.Dump();
421 } 421 }
422 422
423 } // namespace google_breakpad 423 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « no previous file | client/linux/minidump_writer/linux_dumper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698