Adding thread ID to trace lines and cleaning up their formatting.

This commit is contained in:
Ben Vanik
2013-06-30 06:09:08 -07:00
parent 82ee749515
commit 6f602d120a
10 changed files with 84 additions and 49 deletions

View File

@@ -19,8 +19,9 @@ using namespace xe::cpu;
ThreadState::ThreadState(
Processor* processor,
uint32_t stack_size, uint32_t thread_state_address) :
stack_size_(stack_size), thread_state_address_(thread_state_address) {
uint32_t stack_size, uint32_t thread_state_address, uint32_t thread_id) :
stack_size_(stack_size), thread_state_address_(thread_state_address),
thread_id_(thread_id) {
memory_ = processor->memory();
stack_address_ = xe_memory_heap_alloc(memory_, 0, stack_size, 0);
@@ -42,6 +43,10 @@ ThreadState::~ThreadState() {
xe_memory_release(memory_);
}
uint32_t ThreadState::thread_id() const {
return thread_id_;
}
xe_ppc_state_t* ThreadState::ppc_state() {
return &ppc_state_;
}