Index: uspace/app/taskdump/Makefile
===================================================================
--- uspace/app/taskdump/Makefile	(revision 80487bc530704837cb7bf8a502bf18db19969479)
+++ uspace/app/taskdump/Makefile	(revision e515b21a3fde67534b9cb58f7237e854904ccba2)
@@ -29,4 +29,5 @@
 USPACE_PREFIX = ../..
 LIBS = $(LIBC_PREFIX)/libc.a
+EXTRA_CFLAGS = -Iinclude
 
 OUTPUT = taskdump
Index: uspace/app/taskdump/taskdump.c
===================================================================
--- uspace/app/taskdump/taskdump.c	(revision 80487bc530704837cb7bf8a502bf18db19969479)
+++ uspace/app/taskdump/taskdump.c	(revision e515b21a3fde67534b9cb58f7237e854904ccba2)
@@ -46,4 +46,6 @@
 #include <bool.h>
 
+#include <stacktrace.h>
+
 #define LINE_BYTES 16
 
@@ -57,5 +59,5 @@
 static int connect_task(task_id_t task_id);
 static int parse_args(int argc, char *argv[]);
-static void print_syntax();
+static void print_syntax(void);
 static int threads_dump(void);
 static int thread_dump(uintptr_t thash);
@@ -63,4 +65,5 @@
 static int area_dump(as_area_info_t *area);
 static void hex_dump(uintptr_t addr, void *buffer, size_t size);
+static int td_read_uintptr(void *arg, uintptr_t addr, uintptr_t *value);
 
 int main(int argc, char *argv[])
@@ -184,5 +187,5 @@
 }
 
-static void print_syntax()
+static void print_syntax(void)
 {
 	printf("Syntax: taskdump [-m] -t <task_id>\n");
@@ -298,5 +301,6 @@
 {
 	istate_t istate;
-	uintptr_t pc, fp;
+	uintptr_t pc, fp, nfp;
+	stacktrace_t st;
 	int rc;
 
@@ -311,6 +315,21 @@
 
 	printf("Thread 0x%lx crashed at PC 0x%lx. FP 0x%lx\n", thash, pc, fp);
-	printf("Istate hexdump:\n");
-	hex_dump(0, &istate, (sizeof(istate_t) + 15) & ~15);
+
+	st.op_arg = NULL;
+	st.read_uintptr = td_read_uintptr;
+
+	while (stacktrace_fp_valid(&st, fp)) {
+		printf("%p: %p()\n", fp, pc);
+
+		rc = stacktrace_ra_get(&st, fp, &pc);
+		if (rc != EOK)
+			return rc;
+
+		rc = stacktrace_fp_prev(&st, fp, &nfp);
+		if (rc != EOK)
+			return rc;
+
+		fp = nfp;
+	}
 
 	return EOK;
@@ -376,4 +395,21 @@
 }
 
+static int td_read_uintptr(void *arg, uintptr_t addr, uintptr_t *value)
+{
+	uintptr_t data;
+	int rc;
+
+	(void) arg;
+
+	rc = udebug_mem_read(phoneid, &data, addr, sizeof(data));
+	if (rc < 0) {
+		printf("Warning: udebug_mem_read() failed.\n");
+		return rc;
+	}
+
+	*value = data;
+	return EOK;
+}
+
 /** @}
  */
