Skip to contentSkip to conversation

dump_stack for sparc

PATCH New Tom 'spot' Callaway 1 participant 1 message Mar 4, 2005 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dump_stack for sparc

Bob Breuer wrote a patch to add dump_stack for sparc. Supposedly, this was applied, but it doesn't exist in 2.6.11.

This is the same patch, rediffed against 2.6.11.

~spot
---
Tom "spot" Callaway: Red Hat Sales Engineer || GPG Fingerprint: 93054260 Fedora Extras Steering Committee Member (RPM Standards and Practices) Aurora Linux Project Leader: http://auroralinux.org
Lemurs, llamas, and sparcs, oh my!

arch/sparc/kernel/process.c renamed from arch/sparc/kernel/process.c.BAD +11 -0
@@ -333,6 +333,17 @@ void show_stack(struct task_struct *tsk,
 	printk("\n");
 }
 
+void dump_stack(void)
+{
+	unsigned long *ksp;
+
+	__asm__ __volatile__("mov	%%fp, %0"
+			     : "=r" (ksp));
+	show_stack(current, ksp);
+}
+
+EXPORT_SYMBOL(dump_stack);
+
 /*
  * Note: sparc64 has a pretty intricated thread_saved_pc, check it out.
  */