Skip to content
Snippets Groups Projects
Commit 2e1ac72b authored by Kevin Hester's avatar Kevin Hester Committed by Lorenz Meier
Browse files

Speed up stack dumping by looking for freespace 4 bytes at a time

Conflicts:
	mavlink/include/mavlink/v1.0
parent d70ed8ad
No related branches found
No related tags found
No related merge requests found
......@@ -178,9 +178,10 @@ define showtaskstack
printf "can't measure idle stack\n"
else
set $stack_free = 0
while ($stack_free < $task->adj_stack_size) && *(uint8_t *)($task->stack_alloc_ptr + $stack_free)
while ($stack_free < $task->adj_stack_size) && ((uint32_t *)($task->stack_alloc_ptr))[$stack_free] == 0xffffffff
set $stack_free = $stack_free + 1
end
set $stack_free = $stack_free * 4
printf" stack 0x%08x-0x%08x (%d) %d free\n", $task->stack_alloc_ptr, $task->adj_stack_ptr, $task->adj_stack_size, $stack_free
end
end
......@@ -278,4 +279,4 @@ define my_mem
set $cursor = $cursor - 4
end
end
end
\ No newline at end of file
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment