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

Side by Side Diff: src/client/linux/minidump_writer/minidump_writer.cc

Issue 1761023002: Add an optional root prefix to Linux dumpers (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Remove assertions Created 4 years, 9 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 | « src/client/linux/minidump_writer/linux_dumper.cc ('k') | no next file » | 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) 2010, Google Inc. 1 // Copyright (c) 2010, 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } else { 560 } else {
561 // Note: ElfFileIdentifierForMapping() can manipulate the |mapping.name|. 561 // Note: ElfFileIdentifierForMapping() can manipulate the |mapping.name|.
562 dumper_->ElfFileIdentifierForMapping(mapping, member, 562 dumper_->ElfFileIdentifierForMapping(mapping, member,
563 mapping_id, signature); 563 mapping_id, signature);
564 } 564 }
565 my_memset(cv_ptr, 0, sizeof(uint32_t)); // Set age to 0 on Linux. 565 my_memset(cv_ptr, 0, sizeof(uint32_t)); // Set age to 0 on Linux.
566 cv_ptr += sizeof(uint32_t); 566 cv_ptr += sizeof(uint32_t);
567 567
568 char file_name[NAME_MAX]; 568 char file_name[NAME_MAX];
569 char file_path[NAME_MAX]; 569 char file_path[NAME_MAX];
570 LinuxDumper::GetMappingEffectiveNameAndPath( 570 dumper_->GetMappingEffectiveNameAndPath(
571 mapping, file_path, sizeof(file_path), file_name, sizeof(file_name)); 571 mapping, file_path, sizeof(file_path), file_name, sizeof(file_name));
572 572
573 const size_t file_name_len = my_strlen(file_name); 573 const size_t file_name_len = my_strlen(file_name);
574 UntypedMDRVA cv(&minidump_writer_); 574 UntypedMDRVA cv(&minidump_writer_);
575 if (!cv.Allocate(MDCVInfoPDB70_minsize + file_name_len + 1)) 575 if (!cv.Allocate(MDCVInfoPDB70_minsize + file_name_len + 1))
576 return false; 576 return false;
577 577
578 // Write pdb_file_name 578 // Write pdb_file_name
579 my_memcpy(cv_ptr, file_name, file_name_len + 1); 579 my_memcpy(cv_ptr, file_name, file_name_len + 1);
580 cv.Copy(cv_buf, MDCVInfoPDB70_minsize + file_name_len + 1); 580 cv.Copy(cv_buf, MDCVInfoPDB70_minsize + file_name_len + 1);
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 const MappingList& mappings, 1358 const MappingList& mappings,
1359 const AppMemoryList& appmem, 1359 const AppMemoryList& appmem,
1360 LinuxDumper* dumper) { 1360 LinuxDumper* dumper) {
1361 MinidumpWriter writer(filename, -1, NULL, mappings, appmem, dumper); 1361 MinidumpWriter writer(filename, -1, NULL, mappings, appmem, dumper);
1362 if (!writer.Init()) 1362 if (!writer.Init())
1363 return false; 1363 return false;
1364 return writer.Dump(); 1364 return writer.Dump();
1365 } 1365 }
1366 1366
1367 } // namespace google_breakpad 1367 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « src/client/linux/minidump_writer/linux_dumper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698