dump_stack doc

kevin diggs diggskevin38 at gmail.com
Thu Jan 27 07:08:48 EST 2011


Hi,

Does this content look ok:

kevdig at SatelliteA75:/usr/src/linux-2.6.36/arch/powerpc/kernel$ diff
-U3 process.c process-new_c
--- 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: <trap id (%lx)> at <trap handler (%pS)>	]]
+ * [[	    LR = <trapping routine (%pS)>			]]
+ * 	[<stack ("REG")>] [<instruction ("REG")>] <instruction (%pS)> [[
(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);

kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: process.c.diff
Type: text/x-diff
Size: 1441 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20110126/dac76095/attachment.diff>


More information about the Linuxppc-dev mailing list