src/developer/debug/zxdb/console/verbs_symbol.cc
Err CanonicalizeFile(const TargetSymbols* target_symbols, const FileLine& input, FileLine* output) {
  auto matches = target_symbols->FindFileMatches(input.file());
  if (matches.empty()) {
    // No match.
    return Err("There is no source file in this process matching \"" + input.file() + "\".");
  }

  if (matches.size() == 1) {
    // Unambiguous match.
    *output = FileLine(matches[0], input.line());
    return Err();
  }

  // Non-unique file name, generate a disambiguation error.
  std::string msg("The file name is ambiguous, it could be:\n");
  for (const auto& match : matches)
    msg.append("  " + match + "\n");
  return Err(msg);
}
// Expands the input file name to a fully qualified one if it is unique. If it's ambiguous, return
// an error.
Expands the input file name to a fully qualified one if it is unique. If it's ambiguous, return
an error.
Expands the input file name to a fully qualified one if it is unique . If it ' s ambiguous return an error .
Err CanonicalizeFile(const TargetSymbols* target_symbols, const FileLine& input, FileLine* output) {
  auto matches = target_symbols->FindFileMatches(input.file());
  if (matches.empty()) {
    return Err("There is no source file in this process matching \"" + input.file() + "\".");
  }
  if (matches.size() == 1) {
    *output = FileLine(matches[0], input.line());
    return Err();
  }
  std::string msg("The file name is ambiguous, it could be:\n");
  for (const auto& match : matches)
    msg.append("  " + match + "\n");
  return Err(msg);
}
Err CanonicalizeFile ( const TargetSymbols * target_symbols , const FileLine & input , FileLine * output ) { auto matches = target_symbols -> FindFileMatches ( input . file ( ) ) ; if ( matches . empty ( ) ) { return Err ( " \" " + input . file ( ) + " \" " ) ; } if ( matches . size ( ) == 1 ) { * output = FileLine ( matches [ 0 ] , input . line ( ) ) ; return Err ( ) ; } std :: string msg ( " \n " ) ; for ( const auto & match : matches ) msg . append ( " " + match + " \n " ) ; return Err ( msg ) ; }
Expands the input file name to a fully qualified one if it is unique.
Expands the input file name to a fully qualified one if it is unique .
// No match. // Unambiguous match. // Non-unique file name, generate a disambiguation error.