diff --git a/include/n64recomp.h b/include/n64recomp.h index 40ce449..95b783c 100644 --- a/include/n64recomp.h +++ b/include/n64recomp.h @@ -217,7 +217,7 @@ namespace N64Recomp { std::vector event_symbols; // Causes functions to print their name to the console the first time they're called. - bool re_mode; + bool function_trace_mode; // Imports sections and function symbols from a provided context into this context's reference sections and reference functions. bool import_reference_context(const Context& reference_context); diff --git a/src/config.cpp b/src/config.cpp index 6a1e415..68b78d0 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -414,15 +414,15 @@ N64Recomp::Config::Config(const char* path) { } // Use RE mode if enabled (optional) - std::optional re_mode_opt = input_data["re_mode"].value(); - if (re_mode_opt.has_value()) { - re_mode = re_mode_opt.value(); - if (re_mode) { + std::optional function_trace_mode_opt = input_data["function_trace_mode"].value(); + if (function_trace_mode_opt.has_value()) { + function_trace_mode = function_trace_mode_opt.value(); + if (function_trace_mode) { recomp_include += "\n#include \n#include "; } } else { - re_mode = false; + function_trace_mode = false; } // Function reference symbols file (optional) diff --git a/src/config.h b/src/config.h index 836c0f4..af7b1e4 100644 --- a/src/config.h +++ b/src/config.h @@ -42,7 +42,7 @@ namespace N64Recomp { bool single_file_output; bool use_absolute_symbols; bool unpaired_lo16_warnings; - bool re_mode; + bool function_trace_mode; bool allow_exports; bool strict_patch_mode; std::filesystem::path elf_path; diff --git a/src/main.cpp b/src/main.cpp index 608a721..64e5f59 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -509,7 +509,7 @@ int main(int argc, char** argv) { } // Propogate the re_mode parameter. - context.re_mode = config.re_mode; + context.function_trace_mode = config.function_trace_mode; // Apply any single-instruction patches. for (const N64Recomp::InstructionPatch& patch : config.instruction_patches) { diff --git a/src/recompilation.cpp b/src/recompilation.cpp index 09b8d2d..2a82b53 100644 --- a/src/recompilation.cpp +++ b/src/recompilation.cpp @@ -745,7 +745,7 @@ bool N64Recomp::recompile_function(const N64Recomp::Context& context, const N64R " int c1cs = 0;\n", // cop1 conditional signal func.name); - if (context.re_mode) { + if (context.function_trace_mode) { fmt::print(output_file, " static int {0}_was_called = 0;\n" " if ({0}_was_called == 0) {{\n"