diff options
Diffstat (limited to 'semihosting/arm-compat-semi.c')
| -rw-r--r-- | semihosting/arm-compat-semi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 86e5260e50..bc04b02eba 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -696,7 +696,11 @@ void do_common_semihosting(CPUState *cs) retvals[0] = ts->heap_base; retvals[1] = ts->heap_limit; - retvals[2] = ts->stack_base; + /* + * Note that semihosting is *not* thread aware. + * Always return the stack base of the main thread. + */ + retvals[2] = ts->info->start_stack; retvals[3] = 0; /* Stack limit. */ #else retvals[0] = info.heapbase; /* Heap Base */ |