Changeset f5a98c2 in rtems-testing


Ignore:
Timestamp:
May 9, 2010, 4:03:36 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
a19fec9
Parents:
856dc6c
Message:

2010-05-09 Joel Sherrill <joel.sherrilL@…>

  • TargetBase?.cc: Not a fatal error to not find instruction.
Location:
rtems-coverage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtems-coverage/ChangeLog

    r856dc6c rf5a98c2  
     12010-05-09      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        * TargetBase.cc: Not a fatal error to not find instruction.
     4
    152010-05-08      Joel Sherrill <joel.sherrilL@OARcorp.com>
    26
  • rtems-coverage/TargetBase.cc

    r856dc6c rf5a98c2  
    3131  )
    3232  {
     33    std::list <std::string>::iterator i;
     34
    3335    if (branchInstructions.empty()) {
    3436      fprintf(
     
    3941    }
    4042   
    41     if ( find(
    42            branchInstructions.begin(),
    43            branchInstructions.end(),
    44            instruction
    45         ) == branchInstructions.end()
    46     )
     43    i = find(branchInstructions.begin(), branchInstructions.end(), instruction);
     44    if ( i  == branchInstructions.end() )
    4745      return false;
     46
    4847    return true;
    4948  }
     
    5352  )
    5453  {
     54    #define METHOD "ERROR: TargetBase::isBranchLine - "
    5555    const char *ch;
    5656    char instruction[120];
     
    6767      fprintf(
    6868        stderr,
    69         "ERROR: TargetBase::isBranchLine - Unable to find instruction\n"
     69        METHOD "(1) Unable to find instruction in: %s\n",
     70        line
    7071      );
    71       exit( -1 );   
     72      return false;
    7273    }
    7374    ch++;
     
    7980      fprintf(
    8081        stderr,
    81         "ERROR: TargetBase::isBranchLine - Unable to find instruction\n"
     82        METHOD "(2) Unable to find instruction in %s\n",
     83        line
    8284      );
    83       exit( -1 );   
     85      return false;
    8486    }
    8587    ch++;
    8688
    87     // Grab the instruction which is the next word in the buffer after the second tab.
     89    // Grab the instruction which is the next word in the buffer
     90    // after the second tab.
    8891    result = sscanf( ch, "%s", instruction );
    8992    if (result != 1) {
    9093        fprintf(
    9194          stderr,
    92           "ERROR: TargetBase::isBranchLine - Unable to find instruction\n"
     95          METHOD "(3) Unable to find instruction in %s\n",
     96          line
    9397        );
    94         exit( -1 );
     98        return false;
    9599    }
    96100
Note: See TracChangeset for help on using the changeset viewer.