Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, Google Inc. | 1 // Copyright (c) 2012, 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 enum DwarfAttribute attr, | 84 enum DwarfAttribute attr, |
| 85 enum DwarfForm form, | 85 enum DwarfForm form, |
| 86 int64 data)); | 86 int64 data)); |
| 87 MOCK_METHOD4(ProcessAttributeReference, void(uint64 offset, | 87 MOCK_METHOD4(ProcessAttributeReference, void(uint64 offset, |
| 88 enum DwarfAttribute attr, | 88 enum DwarfAttribute attr, |
| 89 enum DwarfForm form, | 89 enum DwarfForm form, |
| 90 uint64 data)); | 90 uint64 data)); |
| 91 MOCK_METHOD5(ProcessAttributeBuffer, void(uint64 offset, | 91 MOCK_METHOD5(ProcessAttributeBuffer, void(uint64 offset, |
| 92 enum DwarfAttribute attr, | 92 enum DwarfAttribute attr, |
| 93 enum DwarfForm form, | 93 enum DwarfForm form, |
| 94 const char* data, | 94 const uint8_t *data, |
| 95 uint64 len)); | 95 uint64 len)); |
| 96 MOCK_METHOD4(ProcessAttributeString, void(uint64 offset, | 96 MOCK_METHOD4(ProcessAttributeString, void(uint64 offset, |
| 97 enum DwarfAttribute attr, | 97 enum DwarfAttribute attr, |
| 98 enum DwarfForm form, | 98 enum DwarfForm form, |
| 99 const string& data)); | 99 const string& data)); |
| 100 MOCK_METHOD4(ProcessAttributeSignature, void(uint64 offset, | 100 MOCK_METHOD4(ProcessAttributeSignature, void(uint64 offset, |
| 101 DwarfAttribute attr, | 101 DwarfAttribute attr, |
| 102 enum DwarfForm form, | 102 enum DwarfForm form, |
| 103 uint64 signature)); | 103 uint64 signature)); |
| 104 MOCK_METHOD1(EndDIE, void(uint64 offset)); | 104 MOCK_METHOD1(EndDIE, void(uint64 offset)); |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 125 // Return a reference to a section map whose .debug_info section refers | 125 // Return a reference to a section map whose .debug_info section refers |
| 126 // to |info|, and whose .debug_abbrev section refers to |abbrevs|. This | 126 // to |info|, and whose .debug_abbrev section refers to |abbrevs|. This |
| 127 // function returns a reference to the same SectionMap each time; new | 127 // function returns a reference to the same SectionMap each time; new |
| 128 // calls wipe out maps established by earlier calls. | 128 // calls wipe out maps established by earlier calls. |
| 129 const SectionMap &MakeSectionMap() { | 129 const SectionMap &MakeSectionMap() { |
| 130 // Copy the sections' contents into strings that will live as long as | 130 // Copy the sections' contents into strings that will live as long as |
| 131 // the map itself. | 131 // the map itself. |
| 132 assert(info.GetContents(&info_contents)); | 132 assert(info.GetContents(&info_contents)); |
| 133 assert(abbrevs.GetContents(&abbrevs_contents)); | 133 assert(abbrevs.GetContents(&abbrevs_contents)); |
| 134 section_map.clear(); | 134 section_map.clear(); |
| 135 section_map[".debug_info"].first = info_contents.data(); | 135 section_map[".debug_info"].first = reinterpret_cast<const uint8_t *>(info_c ontents.data()); |
|
Mark Mentovai
2016/01/25 15:08:43
80 here and a couple of lines down.
| |
| 136 section_map[".debug_info"].second = info_contents.size(); | 136 section_map[".debug_info"].second = info_contents.size(); |
| 137 section_map[".debug_abbrev"].first = abbrevs_contents.data(); | 137 section_map[".debug_abbrev"].first = reinterpret_cast<const uint8_t *>(abbr evs_contents.data()); |
| 138 section_map[".debug_abbrev"].second = abbrevs_contents.size(); | 138 section_map[".debug_abbrev"].second = abbrevs_contents.size(); |
| 139 return section_map; | 139 return section_map; |
| 140 } | 140 } |
| 141 | 141 |
| 142 TestCompilationUnit info; | 142 TestCompilationUnit info; |
| 143 TestAbbrevTable abbrevs; | 143 TestAbbrevTable abbrevs; |
| 144 MockDwarf2Handler handler; | 144 MockDwarf2Handler handler; |
| 145 string abbrevs_contents, info_contents; | 145 string abbrevs_contents, info_contents; |
| 146 SectionMap section_map; | 146 SectionMap section_map; |
| 147 }; | 147 }; |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 475 DwarfHeaderParams(kBigEndian, 4, 3, 4), | 475 DwarfHeaderParams(kBigEndian, 4, 3, 4), |
| 476 DwarfHeaderParams(kBigEndian, 4, 3, 8), | 476 DwarfHeaderParams(kBigEndian, 4, 3, 8), |
| 477 DwarfHeaderParams(kBigEndian, 4, 4, 4), | 477 DwarfHeaderParams(kBigEndian, 4, 4, 4), |
| 478 DwarfHeaderParams(kBigEndian, 4, 4, 8), | 478 DwarfHeaderParams(kBigEndian, 4, 4, 8), |
| 479 DwarfHeaderParams(kBigEndian, 8, 2, 4), | 479 DwarfHeaderParams(kBigEndian, 8, 2, 4), |
| 480 DwarfHeaderParams(kBigEndian, 8, 2, 8), | 480 DwarfHeaderParams(kBigEndian, 8, 2, 8), |
| 481 DwarfHeaderParams(kBigEndian, 8, 3, 4), | 481 DwarfHeaderParams(kBigEndian, 8, 3, 4), |
| 482 DwarfHeaderParams(kBigEndian, 8, 3, 8), | 482 DwarfHeaderParams(kBigEndian, 8, 3, 8), |
| 483 DwarfHeaderParams(kBigEndian, 8, 4, 4), | 483 DwarfHeaderParams(kBigEndian, 8, 4, 4), |
| 484 DwarfHeaderParams(kBigEndian, 8, 4, 8))); | 484 DwarfHeaderParams(kBigEndian, 8, 4, 8))); |
| OLD | NEW |