cpu: make ExecSymbol show the symbol in addition to address
Before this commit, ExecSymbol would show only the symbol and no address: 0: system.cpu: A0 T0 : @_kernel_flags_le_lo32+6 : mrs x0, currentel After this commit, it shows the symbol in addition to the address: 0: system.cpu: A0 T0 : 0x10 @_kernel_flags_le_lo32+6 : mrs x0, currentel Change-Id: I665802f50ce9aeac6bb9e174b5dd06196e757c60 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35077 Reviewed-by: Richard Cooper <richard.cooper@arm.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -77,16 +77,15 @@ Trace::ExeTracerRecord::traceInst(const StaticInstPtr &inst, bool ran)
|
||||
|
||||
Addr cur_pc = pc.instAddr();
|
||||
Loader::SymbolTable::const_iterator it;
|
||||
ccprintf(outs, "%#x", cur_pc);
|
||||
if (Debug::ExecSymbol && (!FullSystem || !inUserMode(thread)) &&
|
||||
(it = Loader::debugSymbolTable.findNearest(cur_pc)) !=
|
||||
Loader::debugSymbolTable.end()) {
|
||||
Addr delta = cur_pc - it->address;
|
||||
if (delta)
|
||||
ccprintf(outs, "@%s+%d", it->name, delta);
|
||||
ccprintf(outs, " @%s+%d", it->name, delta);
|
||||
else
|
||||
ccprintf(outs, "@%s", it->name);
|
||||
} else {
|
||||
ccprintf(outs, "%#x", cur_pc);
|
||||
ccprintf(outs, " @%s", it->name);
|
||||
}
|
||||
|
||||
if (inst->isMicroop()) {
|
||||
|
||||
Reference in New Issue
Block a user