From 0ecc573a8ba79bca8e37809c41f92f0b629149e8 Mon Sep 17 00:00:00 2001 From: Karel Klic Date: Thu, 12 Nov 2009 17:02:02 +0100 Subject: Backtrace print tree wip --- src/Backtrace/backtrace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Backtrace') diff --git a/src/Backtrace/backtrace.c b/src/Backtrace/backtrace.c index 3777c0f..b2a1e6d 100644 --- a/src/Backtrace/backtrace.c +++ b/src/Backtrace/backtrace.c @@ -96,6 +96,10 @@ struct thread *thread_add_sibling(struct thread *a, struct thread *b) return a; } +static void thread_print_tree(struct thread *thread) +{ +} + struct backtrace *backtrace_new() { struct backtrace *bt = malloc(sizeof(struct backtrace)); @@ -135,4 +139,10 @@ static int backtrace_get_thread_count(struct backtrace *bt) void backtrace_print_tree(struct backtrace *bt) { printf("Thread count: %d\n", backtrace_get_thread_count(bt)); + struct thread *thread = bt->threads; + while (thread) + { + thread_print_tree(thread); + thread = thread->next; + } } -- cgit