Set up pointers to the stack-pointer/frame-pointer words in the thread's
authorsrinivas
Fri, 01 May 1998 19:47:14 +0000
changeset 79 de4bad8e7f184395a16c809fa4d404f792c0f5fb
parent 78 0ce62c5af7b30bb734f8ad5feb7878a3f8c957cf
child 80 a03073693c7f200f2652950b670ac27430c504e4
push idunknown
push userunknown
push dateunknown
Set up pointers to the stack-pointer/frame-pointer words in the thread's context structure. Useful for displaying thread stacks in the debugger.
pr/src/md/unix/linux.c
--- a/pr/src/md/unix/linux.c
+++ b/pr/src/md/unix/linux.c
@@ -51,16 +51,22 @@ void
 _MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri)
 {
     return;
 }
 
 PRStatus
 _MD_InitializeThread(PRThread *thread)
 {
+	/*
+	 * set the pointers to the stack-pointer and frame-pointer words in the
+	 * context structure; this is for debugging use.
+	 */
+	thread->md.sp = _MD_GET_SP_PTR(thread);
+	thread->md.fp = _MD_GET_FP_PTR(thread);
 	return PR_SUCCESS;
 }
 
 PRStatus
 _MD_WAIT(PRThread *thread, PRIntervalTime ticks)
 {
     PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
     _PR_MD_SWITCH_CONTEXT(thread);