Changeset a3a1364 in rtems-tools


Ignore:
Timestamp:
Aug 21, 2018, 4:43:28 AM (8 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
0813c87
Parents:
458a144
git-author:
Chris Johns <chrisj@…> (08/21/18 04:43:28)
git-committer:
Chris Johns <chrisj@…> (08/21/18 04:45:25)
Message:

covoar: Close the ELF and DWARF handles once the data is loaded.

This avoids the processing being killed with to many file handles
open.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester/covoar/ExecutableInfo.cc

    r458a144 ra3a1364  
    3838    executable.begin();
    3939    executable.load_symbols(symbols);
     40
    4041    debug.begin(executable.elf());
    4142    debug.load_debug();
    4243    debug.load_functions();
    4344
    44     for (auto& cu : debug.get_cus()) {
    45       for (auto& func : cu.get_functions()) {
    46         if (func.has_machine_code() && (!func.is_inlined() || func.is_external())) {
    47           createCoverageMap (cu.name(), func.name(),
    48                              func.pc_low(), func.pc_high());
     45    try {
     46      for (auto& cu : debug.get_cus()) {
     47        for (auto& func : cu.get_functions()) {
     48          if (func.has_machine_code() && (!func.is_inlined() || func.is_external())) {
     49            createCoverageMap (cu.name(), func.name(),
     50                               func.pc_low(), func.pc_high());
     51          }
    4952        }
    5053      }
     54    } catch (...) {
     55      debug.end();
     56      executable.end();
     57      executable.close();
     58      throw;
    5159    }
     60
     61    debug.end();
     62    executable.end();
     63    executable.close();
    5264  }
    5365
    5466  ExecutableInfo::~ExecutableInfo()
    5567  {
    56     debug.end();
    57     executable.end();
    58     executable.close();
    5968  }
    6069
Note: See TracChangeset for help on using the changeset viewer.