arch,cpu: Move the inUserMode function to the ISA object.
This function is used when tracing execution with --debug-flags=Exec. The data used by the function (now method) is stored in the ISA object, and so that's a logical place to move it. Change-Id: I624f9365124679343e988cabfb4e1929225b439a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39323 Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -60,11 +60,11 @@ Trace::ExeTracerRecord::traceInst(const StaticInstPtr &inst, bool ran)
|
||||
{
|
||||
std::stringstream outs;
|
||||
|
||||
if (!Debug::ExecUser || !Debug::ExecKernel) {
|
||||
bool in_user_mode = TheISA::inUserMode(thread);
|
||||
if (in_user_mode && !Debug::ExecUser) return;
|
||||
if (!in_user_mode && !Debug::ExecKernel) return;
|
||||
}
|
||||
const bool in_user_mode = thread->getIsaPtr()->inUserMode();
|
||||
if (in_user_mode && !Debug::ExecUser)
|
||||
return;
|
||||
if (!in_user_mode && !Debug::ExecKernel)
|
||||
return;
|
||||
|
||||
if (Debug::ExecAsid) {
|
||||
outs << "A" << std::dec <<
|
||||
@@ -77,7 +77,7 @@ 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 || !TheISA::inUserMode(thread)) &&
|
||||
if (Debug::ExecSymbol && (!FullSystem || !in_user_mode) &&
|
||||
(it = Loader::debugSymbolTable.findNearest(cur_pc)) !=
|
||||
Loader::debugSymbolTable.end()) {
|
||||
Addr delta = cur_pc - it->address;
|
||||
|
||||
Reference in New Issue
Block a user