| OLD | NEW |
| 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 return true; | 882 return true; |
| 883 } | 883 } |
| 884 | 884 |
| 885 template<typename ElfClass> | 885 template<typename ElfClass> |
| 886 bool ReadSymbolDataElfClass(const typename ElfClass::Ehdr* elf_header, | 886 bool ReadSymbolDataElfClass(const typename ElfClass::Ehdr* elf_header, |
| 887 const string& obj_filename, | 887 const string& obj_filename, |
| 888 const std::vector<string>& debug_dirs, | 888 const std::vector<string>& debug_dirs, |
| 889 const DumpOptions& options, | 889 const DumpOptions& options, |
| 890 Module** out_module) { | 890 Module** out_module) { |
| 891 typedef typename ElfClass::Ehdr Ehdr; | 891 typedef typename ElfClass::Ehdr Ehdr; |
| 892 typedef typename ElfClass::Shdr Shdr; | |
| 893 | 892 |
| 894 *out_module = NULL; | 893 *out_module = NULL; |
| 895 | 894 |
| 896 unsigned char identifier[16]; | 895 unsigned char identifier[16]; |
| 897 if (!google_breakpad::FileID::ElfFileIdentifierFromMappedFile(elf_header, | 896 if (!google_breakpad::FileID::ElfFileIdentifierFromMappedFile(elf_header, |
| 898 identifier)) { | 897 identifier)) { |
| 899 fprintf(stderr, "%s: unable to generate file identifier\n", | 898 fprintf(stderr, "%s: unable to generate file identifier\n", |
| 900 obj_filename.c_str()); | 899 obj_filename.c_str()); |
| 901 return false; | 900 return false; |
| 902 } | 901 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 MmapWrapper map_wrapper; | 997 MmapWrapper map_wrapper; |
| 999 void* elf_header = NULL; | 998 void* elf_header = NULL; |
| 1000 if (!LoadELF(obj_file, &map_wrapper, &elf_header)) | 999 if (!LoadELF(obj_file, &map_wrapper, &elf_header)) |
| 1001 return false; | 1000 return false; |
| 1002 | 1001 |
| 1003 return ReadSymbolDataInternal(reinterpret_cast<uint8_t*>(elf_header), | 1002 return ReadSymbolDataInternal(reinterpret_cast<uint8_t*>(elf_header), |
| 1004 obj_file, debug_dirs, options, module); | 1003 obj_file, debug_dirs, options, module); |
| 1005 } | 1004 } |
| 1006 | 1005 |
| 1007 } // namespace google_breakpad | 1006 } // namespace google_breakpad |
| OLD | NEW |