diff options
| author | zhaohengbo <[email protected]> | 2018-12-15 11:20:24 +0800 |
|---|---|---|
| committer | zhaohengbo <[email protected]> | 2018-12-15 11:20:24 +0800 |
| commit | afcd8b452114d3ba3ed72d6d143942da7d8a30f4 (patch) | |
| tree | 6d13a2ba3887dd20e3a2fd50ba7b714b12edc1ab /components | |
| parent | 61b8db8ee9d3d649ee9b39d4e7e25516fa54117f (diff) | |
fix some bug when stack grows upward
Diffstat (limited to 'components')
| -rw-r--r-- | components/finsh/cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c index 0c06303b14..6bb8bce4de 100644 --- a/components/finsh/cmd.c +++ b/components/finsh/cmd.c @@ -116,7 +116,7 @@ static long _list_thread(struct rt_list_node *list) else if (stat == RT_THREAD_CLOSE) rt_kprintf(" close "); #if defined(ARCH_CPU_STACK_GROWS_UPWARD) - ptr = (rt_uint8_t *)thread->stack_addr + thread->stack_size; + ptr = (rt_uint8_t *)thread->stack_addr + thread->stack_size - 1; while (*ptr == '#')ptr --; rt_kprintf(" 0x%08x 0x%08x %02d%% 0x%08x %03d\n", |
