From 20a7d3f570f51f9360554d7bb706084481bb0484 Mon Sep 17 00:00:00 2001
From: Andreas Faerber <andreas.faerber@web.de>
Date: Sun, 6 Jun 2010 14:10:15 +0200
Subject: [PATCH 2/2] Exclude stack_trace function from stack trace
Much more we cannot exclude since the call stack varies depending on caller.
In particular the function is called either through arch_debug_get_stack_trace
or interactively through the kernel debugger.
---
src/system/kernel/arch/ppc/arch_debug.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/system/kernel/arch/ppc/arch_debug.cpp b/src/system/kernel/arch/ppc/arch_debug.cpp
index d5d9458..dc7179a 100644
a
|
b
|
stack_trace(int argc, char **argv)
|
124 | 124 | |
125 | 125 | if (argc < 2) { |
126 | 126 | thread = thread_get_current_thread(); |
127 | | framePointer = (addr_t)get_current_stack_frame(); |
| 127 | framePointer = (addr_t)get_current_stack_frame()->previous; |
128 | 128 | } else { |
129 | 129 | // TODO: Add support for stack traces of other threads. |
130 | 130 | /* thread_id id = strtoul(argv[1], NULL, 0); |