Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 2004 01:37:00 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 56564 for review
Message-ID:  <200407060137.i661b0Nd098819@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=56564

Change 56564 by marcel@marcel_nfs on 2004/07/06 01:36:46

	Implement makectx() on sparc64. Tested and working.
	
	This is a rather minimal implementation, but I guess it's enough.
	Note that backtraces are weird on sparc64. It's not showing the
	innermost frame...

Affected files ...

.. //depot/projects/gdb/sys/sparc64/sparc64/machdep.c#7 edit

Differences ...

==== //depot/projects/gdb/sys/sparc64/sparc64/machdep.c#7 (text+ko) ====

@@ -567,6 +567,21 @@
 }
 #endif
 
+/*
+ * Construct a PCB from a trapframe. This is called from kdb_trap() where
+ * we want to start a backtrace from the function that caused us to enter
+ * the debugger. We have the context in the trapframe, but base the trace
+ * on the PCB. The PCB doesn't have to be perfect, as long as it contains
+ * enough for a backtrace.
+ */
+void
+makectx(struct trapframe *tf, struct pcb *pcb)
+{
+
+	pcb->pcb_pc = tf->tf_tpc;
+	pcb->pcb_sp = tf->tf_sp;
+}
+
 int
 get_mcontext(struct thread *td, mcontext_t *mc, int flags)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407060137.i661b0Nd098819>