From b2e5152e164d3d470e2887c9c4d0b17b0c3946cc Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Sun, 19 Jun 2011 21:43:33 -0400 Subject: [PATCH] simple-thread: give a name() function for debugging w/the SimpleThread object --- src/cpu/simple_thread.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh index dcf0663e2..a74616a0d 100644 --- a/src/cpu/simple_thread.hh +++ b/src/cpu/simple_thread.hh @@ -114,6 +114,11 @@ class SimpleThread : public ThreadState bool predicate; public: + std::string name() const + { + return csprintf("%s.[tid:%i]", cpu->name(), tc->threadId()); + } + // pointer to CPU associated with this SimpleThread BaseCPU *cpu; -- 2.30.2