diff --git a/src/ClientFunctionIndex.cc b/src/ClientFunctionIndex.cc index f7442c73..879e1b56 100644 --- a/src/ClientFunctionIndex.cc +++ b/src/ClientFunctionIndex.cc @@ -251,6 +251,9 @@ ClientFunctionIndex::ClientFunctionIndex(const std::string& root_dir, bool raise add_directory(item_path); } else if (item_path.ends_with(".s") && std::filesystem::is_regular_file(item_path)) { client_functions_log.debug_f("Adding {} from {}", item_name, item_path); + if (item_name.find("Dragon") != std::string::npos) { + client_functions_log.warning_f("Dragon source load debug: adding {} from {}", item_name, item_path); + } if (!source_files.emplace(item_name, phosg::load_file(item_path)).second) { throw std::runtime_error(std::format("Duplicate source filename: {}", item_name)); } @@ -285,6 +288,20 @@ ClientFunctionIndex::ClientFunctionIndex(const std::string& root_dir, bool raise throw std::runtime_error(std::format("({} preprocessing) {}", source_filename, e.what())); } + if (source_filename.find("Dragon") != std::string::npos) { + client_functions_log.warning_f( + "Dragon preprocess debug: source={} produced {} version chunk(s)", + source_filename, + preprocessed.size()); + for (const auto& [debug_sv, debug_source] : preprocessed) { + client_functions_log.warning_f( + "Dragon preprocess debug: source={} sv={} chunk_size={}", + source_filename, + str_for_specific_version(debug_sv), + debug_source.size()); + } + } + for (const auto& [specific_version, source] : preprocessed) { std::shared_ptr fn = std::make_shared(); fn->short_name = source_filename.substr(0, source_filename.size() - 2);