Allocating stacks in the right place.

This commit is contained in:
Ben Vanik
2015-05-17 13:10:02 -07:00
parent 37804d692c
commit b44a7a7730
6 changed files with 39 additions and 14 deletions

View File

@@ -70,9 +70,9 @@ class TestFunction {
uint32_t stack_size = 64 * 1024;
uint32_t stack_address = memory_size - stack_size;
uint32_t thread_state_address = stack_address - 0x1000;
auto thread_state =
std::make_unique<ThreadState>(processor.get(), 0x100, stack_address,
stack_size, thread_state_address);
auto thread_state = std::make_unique<ThreadState>(
processor.get(), 0x100, ThreadStackType::kUserStack, stack_address,
stack_size, thread_state_address);
auto ctx = thread_state->context();
ctx->lr = 0xBEBEBEBE;