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

Side by Side Diff: src/common/linux/dump_symbols.cc

Issue 2052263002: Dump INFO CODE_ID containing Build ID in Linux dump_syms (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Oops, it's supposed to be INFO CODE_ID Created 4 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 | src/common/linux/dump_symbols_unittest.cc » ('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) 2011 Google Inc. 1 // Copyright (c) 2011 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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 obj_filename.c_str(), elf_header->e_machine); 919 obj_filename.c_str(), elf_header->e_machine);
920 return false; 920 return false;
921 } 921 }
922 922
923 string name = BaseFileName(obj_filename); 923 string name = BaseFileName(obj_filename);
924 string os = "Linux"; 924 string os = "Linux";
925 // Add an extra "0" at the end. PDB files on Windows have an 'age' 925 // Add an extra "0" at the end. PDB files on Windows have an 'age'
926 // number appended to the end of the file identifier; this isn't 926 // number appended to the end of the file identifier; this isn't
927 // really used or necessary on other platforms, but be consistent. 927 // really used or necessary on other platforms, but be consistent.
928 string id = FileID::ConvertIdentifierToUUIDString(identifier) + "0"; 928 string id = FileID::ConvertIdentifierToUUIDString(identifier) + "0";
929 // This is just the raw Build ID in hex.
930 string code_id = FileID::ConvertIdentifierToString(identifier);
929 931
930 module.reset(new Module(name, os, architecture, id)); 932 module.reset(new Module(name, os, architecture, id, code_id));
931 933
932 return true; 934 return true;
933 } 935 }
934 936
935 template<typename ElfClass> 937 template<typename ElfClass>
936 bool ReadSymbolDataElfClass(const typename ElfClass::Ehdr* elf_header, 938 bool ReadSymbolDataElfClass(const typename ElfClass::Ehdr* elf_header,
937 const string& obj_filename, 939 const string& obj_filename,
938 const std::vector<string>& debug_dirs, 940 const std::vector<string>& debug_dirs,
939 const DumpOptions& options, 941 const DumpOptions& options,
940 Module** out_module) { 942 Module** out_module) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 MmapWrapper map_wrapper; 1075 MmapWrapper map_wrapper;
1074 void* elf_header = NULL; 1076 void* elf_header = NULL;
1075 if (!LoadELF(obj_file, &map_wrapper, &elf_header)) 1077 if (!LoadELF(obj_file, &map_wrapper, &elf_header))
1076 return false; 1078 return false;
1077 1079
1078 return ReadSymbolDataInternal(reinterpret_cast<uint8_t*>(elf_header), 1080 return ReadSymbolDataInternal(reinterpret_cast<uint8_t*>(elf_header),
1079 obj_file, debug_dirs, options, module); 1081 obj_file, debug_dirs, options, module);
1080 } 1082 }
1081 1083
1082 } // namespace google_breakpad 1084 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « no previous file | src/common/linux/dump_symbols_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698