From 9789b250f00c23bdd910b1c15dd5e9dde5b78e13 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Mon, 19 Dec 2022 21:01:16 -0800 Subject: [PATCH] Always perform symbol lookup in debug --- riscv/execute.cc | 5 ----- riscv/processor.cc | 7 +++++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/riscv/execute.cc b/riscv/execute.cc index 96aed2dd..83683742 100644 --- a/riscv/execute.cc +++ b/riscv/execute.cc @@ -60,11 +60,6 @@ static void commit_log_print_value(FILE *log_file, int width, uint64_t val) commit_log_print_value(log_file, width, &val); } -const char* processor_t::get_symbol(uint64_t addr) -{ - return sim->get_symbol(addr); -} - static void commit_log_print_insn(processor_t *p, reg_t pc, insn_t insn) { FILE *log_file = p->get_log_file(); diff --git a/riscv/processor.cc b/riscv/processor.cc index 560f71e9..b906c8fb 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -891,20 +891,23 @@ void processor_t::take_trigger_action(triggers::action_t action, reg_t breakpoin } } +const char* processor_t::get_symbol(uint64_t addr) +{ + return sim->get_symbol(addr); +} + void processor_t::disasm(insn_t insn) { uint64_t bits = insn.bits(); if (last_pc != state.pc || last_bits != bits) { std::stringstream s; // first put everything in a string, later send it to output -#ifdef RISCV_ENABLE_COMMITLOG const char* sym = get_symbol(state.pc); if (sym != nullptr) { s << "core " << std::dec << std::setfill(' ') << std::setw(3) << id << ": >>>> " << sym << std::endl; } -#endif if (executions != 1) { s << "core " << std::dec << std::setfill(' ') << std::setw(3) << id