OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "crash-reporter/user_collector.h" | 5 #include "crash-reporter/user_collector.h" |
6 | 6 |
7 #include <grp.h> // For struct group. | 7 #include <grp.h> // For struct group. |
8 #include <pwd.h> // For struct passwd. | 8 #include <pwd.h> // For struct passwd. |
9 #include <sys/types.h> // For getpwuid_r and getgrnam_r. | 9 #include <sys/types.h> // For getpwuid_r and getgrnam_r. |
10 | 10 |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 container_dir, // procfs directory | 271 container_dir, // procfs directory |
272 minidump_path, | 272 minidump_path, |
273 container_dir)) { // temporary directory | 273 container_dir)) { // temporary directory |
274 // Note we leave the container directory for inspection. | 274 // Note we leave the container directory for inspection. |
275 conversion_result = false; | 275 conversion_result = false; |
276 } | 276 } |
277 | 277 |
278 WriteCrashMetaData( | 278 WriteCrashMetaData( |
279 crash_path.Append( | 279 crash_path.Append( |
280 StringPrintf("%s.meta", dump_basename.c_str())), | 280 StringPrintf("%s.meta", dump_basename.c_str())), |
281 exec_name); | 281 exec_name, |
| 282 minidump_path.value()); |
282 | 283 |
283 if (conversion_result) { | 284 if (conversion_result) { |
284 logger_->LogInfo("Stored minidump to %s", minidump_path.value().c_str()); | 285 logger_->LogInfo("Stored minidump to %s", minidump_path.value().c_str()); |
285 } | 286 } |
286 | 287 |
287 if (!file_util::PathExists(FilePath(kLeaveCoreFile))) { | 288 if (!file_util::PathExists(FilePath(kLeaveCoreFile))) { |
288 file_util::Delete(core_path, false); | 289 file_util::Delete(core_path, false); |
289 } else { | 290 } else { |
290 logger_->LogInfo("Leaving core file at %s", core_path.value().c_str()); | 291 logger_->LogInfo("Leaving core file at %s", core_path.value().c_str()); |
291 } | 292 } |
(...skipping 18 matching lines...) Expand all Loading... |
310 | 311 |
311 if (feedback) { | 312 if (feedback) { |
312 count_crash_function_(); | 313 count_crash_function_(); |
313 | 314 |
314 if (generate_diagnostics_) { | 315 if (generate_diagnostics_) { |
315 return GenerateDiagnostics(pid, exec); | 316 return GenerateDiagnostics(pid, exec); |
316 } | 317 } |
317 } | 318 } |
318 return true; | 319 return true; |
319 } | 320 } |
OLD | NEW |