OLD | NEW |
1 // Copyright 2013 Google Inc. All rights reserved. | 1 // Copyright 2013 Google Inc. All rights reserved. |
2 // | 2 // |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following disclaimer | 10 // copyright notice, this list of conditions and the following disclaimer |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 } | 203 } |
204 | 204 |
205 // Read the table. | 205 // Read the table. |
206 table->resize(count); | 206 table->resize(count); |
207 bytes_read = 0; | 207 bytes_read = 0; |
208 count_read = 0; | 208 count_read = 0; |
209 if (FAILED(stream->Next(count, bytes_expected, &bytes_read, | 209 if (FAILED(stream->Next(count, bytes_expected, &bytes_read, |
210 reinterpret_cast<BYTE*>(&table->at(0)), | 210 reinterpret_cast<BYTE*>(&table->at(0)), |
211 &count_read))) { | 211 &count_read))) { |
212 fprintf(stderr, "IDiaEnumDebugStreamData::Next failed while reading " | 212 fprintf(stderr, "IDiaEnumDebugStreamData::Next failed while reading " |
213 "data from stream \"%ws\"\n"); | 213 "data from stream \"%ws\"\n", name); |
214 return false; | 214 return false; |
215 } | 215 } |
216 | 216 |
217 return true; | 217 return true; |
218 } | 218 } |
219 | 219 |
220 // This determines the original image length by looking through the segment | 220 // This determines the original image length by looking through the segment |
221 // table. | 221 // table. |
222 bool GetOriginalImageLength(IDiaSession* session, DWORD* image_length) { | 222 bool GetOriginalImageLength(IDiaSession* session, DWORD* image_length) { |
223 assert(session != NULL); | 223 assert(session != NULL); |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 // Output the range in progress. | 685 // Output the range in progress. |
686 if (rva_begin < rva_cur_content) { | 686 if (rva_begin < rva_cur_content) { |
687 mapped_ranges->push_back( | 687 mapped_ranges->push_back( |
688 AddressRange(rva_begin, rva_cur_content - rva_begin)); | 688 AddressRange(rva_begin, rva_cur_content - rva_begin)); |
689 } | 689 } |
690 | 690 |
691 return; | 691 return; |
692 } | 692 } |
693 | 693 |
694 } // namespace google_breakpad | 694 } // namespace google_breakpad |
OLD | NEW |