From patchwork Wed Jan 26 20:08:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: dump_stack doc Date: Wed, 26 Jan 2011 10:08:48 -0000 From: kevin diggs X-Patchwork-Id: 80549 Message-Id: To: linuxppc-dev@lists.ozlabs.org Hi, Does this content look ok: kevdig@SatelliteA75:/usr/src/linux-2.6.36/arch/powerpc/kernel$ diff -U3 process.c process-new_c unsigned long sp, ip, lr, newsp; @@ -1177,6 +1198,11 @@ } while (count++ < kstack_depth_to_print); } +/** + * void dump_stack(void) - dump the contents of the stack in readable form + * + * See process.c`show_stack() for details + */ void dump_stack(void) { show_stack(current, NULL); kevin --- process.c 2010-10-23 20:01:13.000000000 -0500 +++ process-new_c 2011-01-26 14:04:17.000000000 -0600 @@ -1107,6 +1107,27 @@ static int kstack_depth_to_print = CONFIG_PRINT_STACK_DEPTH; +/** + * void show_stack() - dump the contents of the stack in readable format + * @struct task_struct *tsk: pointer to task struct owning stack frame + * @unsigned long *stack: pointer to stack frame + * + * Dump the stack in bipedal carbon unit readable form. Format is: + * Call Trace: + * [[ --- Exception: at ]] + * [[ LR = ]] + * [] [] [[ (unreliable)]] + * + * Information between '[[' & ']]' is optional. Additional information is + * printed at the beginning of what are believed to be exception frames. + * + * The first frame is considered unreliable and will have " (unreliable)" + * tacked on the end. + * + * kstack_depth_to_print determines how many frames to show. + * + * Value in parenthesis is the format specifier used. See printk(). + */ void show_stack(struct task_struct *tsk, unsigned long *stack) { unsigned long sp, ip, lr, newsp; @@ -1177,6 +1198,11 @@ } while (count++ < kstack_depth_to_print); } +/** + * void dump_stack(void) - dump the contents of the stack in readable form + * + * See process.c`show_stack() for details + */ void dump_stack(void) { show_stack(current, NULL);