From e5a7411cd74ea60892ea3bd6479e4c6d0e253eff Mon Sep 17 00:00:00 2001 From: Andrew Donnellan Date: Mon, 18 Mar 2019 15:28:58 +1100 Subject: core/stack: Convert stack check code to not use backtrace wrapper We're about to get rid of __backtrace() and __print_backtrace(), convert the stack check code to not use them. Signed-off-by: Andrew Donnellan Signed-off-by: Stewart Smith --- core/stack.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/stack.c b/core/stack.c index f7eca1ff..2e47cd4d 100644 --- a/core/stack.c +++ b/core/stack.c @@ -175,13 +175,12 @@ void __nomcount __mcount_stack_check(uint64_t sp, uint64_t lr) /* Capture lowest stack for this thread */ if (mark < c->stack_bot_mark) { - unsigned int count = CPU_BACKTRACE_SIZE; lock(&stack_check_lock); c->stack_bot_mark = mark; c->stack_bot_pc = lr; c->stack_bot_tok = c->current_token; - __backtrace(c->stack_bot_bt, &count); - c->stack_bot_bt_count = count; + backtrace_create(c->stack_bot_bt, CPU_BACKTRACE_SIZE, + &c->stack_bot_bt_metadata); unlock(&stack_check_lock); } @@ -232,8 +231,9 @@ void check_stacks(void) " pc=%08llx token=%lld\n", lowest->pir, lowest->stack_bot_mark, lowest->stack_bot_pc, lowest->stack_bot_tok); - __print_backtrace(lowest->pir, lowest->stack_bot_bt, - lowest->stack_bot_bt_count, NULL, NULL, true); + backtrace_print(lowest->stack_bot_bt, + &lowest->stack_bot_bt_metadata, + NULL, NULL, true); unlock(&stack_check_lock); } -- cgit v1.2.1