| OLD | NEW |
| 1 // -*- mode: c++ -*- | 1 // -*- mode: c++ -*- |
| 2 | 2 |
| 3 // Copyright (c) 2011, Google Inc. | 3 // Copyright (c) 2011, Google Inc. |
| 4 // All rights reserved. | 4 // All rights reserved. |
| 5 // | 5 // |
| 6 // Redistribution and use in source and binary forms, with or without | 6 // Redistribution and use in source and binary forms, with or without |
| 7 // modification, are permitted provided that the following conditions are | 7 // modification, are permitted provided that the following conditions are |
| 8 // met: | 8 // met: |
| 9 // | 9 // |
| 10 // * Redistributions of source code must retain the above copyright | 10 // * Redistributions of source code must retain the above copyright |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 uint64 debug_info_length = debug_info_section.second; | 430 uint64 debug_info_length = debug_info_section.second; |
| 431 for (uint64 offset = 0; offset < debug_info_length;) { | 431 for (uint64 offset = 0; offset < debug_info_length;) { |
| 432 // Make a handler for the root DIE that populates MODULE with the | 432 // Make a handler for the root DIE that populates MODULE with the |
| 433 // debug info. | 433 // debug info. |
| 434 DwarfCUToModule::WarningReporter reporter(selected_object_name_, | 434 DwarfCUToModule::WarningReporter reporter(selected_object_name_, |
| 435 offset); | 435 offset); |
| 436 DwarfCUToModule root_handler(&file_context, &line_to_module, &reporter); | 436 DwarfCUToModule root_handler(&file_context, &line_to_module, &reporter); |
| 437 // Make a Dwarf2Handler that drives our DIEHandler. | 437 // Make a Dwarf2Handler that drives our DIEHandler. |
| 438 dwarf2reader::DIEDispatcher die_dispatcher(&root_handler); | 438 dwarf2reader::DIEDispatcher die_dispatcher(&root_handler); |
| 439 // Make a DWARF parser for the compilation unit at OFFSET. | 439 // Make a DWARF parser for the compilation unit at OFFSET. |
| 440 dwarf2reader::CompilationUnit dwarf_reader(file_context.section_map(), | 440 dwarf2reader::CompilationUnit dwarf_reader(selected_object_name_, |
| 441 file_context.section_map(), |
| 441 offset, | 442 offset, |
| 442 &byte_reader, | 443 &byte_reader, |
| 443 &die_dispatcher); | 444 &die_dispatcher); |
| 444 // Process the entire compilation unit; get the offset of the next. | 445 // Process the entire compilation unit; get the offset of the next. |
| 445 offset += dwarf_reader.Start(); | 446 offset += dwarf_reader.Start(); |
| 446 } | 447 } |
| 447 | 448 |
| 448 return true; | 449 return true; |
| 449 } | 450 } |
| 450 | 451 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 // it and return false. | 637 // it and return false. |
| 637 bool DumpSymbols::WriteSymbolFileHeader(std::ostream &stream) { | 638 bool DumpSymbols::WriteSymbolFileHeader(std::ostream &stream) { |
| 638 scoped_ptr<Module> module; | 639 scoped_ptr<Module> module; |
| 639 if (!CreateEmptyModule(module)) | 640 if (!CreateEmptyModule(module)) |
| 640 return false; | 641 return false; |
| 641 | 642 |
| 642 return module->Write(stream, symbol_data_); | 643 return module->Write(stream, symbol_data_); |
| 643 } | 644 } |
| 644 | 645 |
| 645 } // namespace google_breakpad | 646 } // namespace google_breakpad |
| OLD | NEW |