PERFORCE change 56564 for review
Marcel Moolenaar
marcel at FreeBSD.org
Mon Jul 5 18:37:02 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=56564
Change 56564 by marcel at 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)
{
More information about the p4-projects
mailing list