Module Name:    src
Committed By:   rin
Date:           Thu Sep 10 02:03:44 UTC 2020

Modified Files:
        src/sys/arch/sun2/sun2: promlib.c
        src/sys/arch/sun3/sun3: sunmon.c

Log Message:
Fix tracedump() for sun3 and sun2 by adding __noinline attribute.

It unwinds stack frame by using address of its first argument, which
does not, of course, work if inline-expanded.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sun2/sun2/promlib.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sun3/sun3/sunmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sun2/sun2/promlib.c
diff -u src/sys/arch/sun2/sun2/promlib.c:1.18 src/sys/arch/sun2/sun2/promlib.c:1.19
--- src/sys/arch/sun2/sun2/promlib.c:1.18	Mon Mar 24 18:50:31 2014
+++ src/sys/arch/sun2/sun2/promlib.c	Thu Sep 10 02:03:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: promlib.c,v 1.18 2014/03/24 18:50:31 christos Exp $	*/
+/*	$NetBSD: promlib.c,v 1.19 2020/09/10 02:03:44 rin Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: promlib.c,v 1.18 2014/03/24 18:50:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: promlib.c,v 1.19 2020/09/10 02:03:44 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -349,7 +349,7 @@ struct funcall_frame {
 	int fr_arg[1];
 };
 /*VARARGS0*/
-static void 
+static void __noinline
 tracedump(int x1)
 {
 	struct funcall_frame *fp = (struct funcall_frame *)(&x1 - 2);

Index: src/sys/arch/sun3/sun3/sunmon.c
diff -u src/sys/arch/sun3/sun3/sunmon.c:1.21 src/sys/arch/sun3/sun3/sunmon.c:1.22
--- src/sys/arch/sun3/sun3/sunmon.c:1.21	Sat Oct 18 08:33:27 2014
+++ src/sys/arch/sun3/sun3/sunmon.c	Thu Sep 10 02:03:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sunmon.c,v 1.21 2014/10/18 08:33:27 snj Exp $	*/
+/*	$NetBSD: sunmon.c,v 1.22 2020/09/10 02:03:44 rin Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunmon.c,v 1.21 2014/10/18 08:33:27 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunmon.c,v 1.22 2020/09/10 02:03:44 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -168,7 +168,7 @@ struct funcall_frame {
 	int fr_arg[1];
 };
 /*VARARGS0*/
-static void
+static void __noinline
 tracedump(int x1)
 {
 	struct funcall_frame *fp = (struct funcall_frame *)(&x1 - 2);

Reply via email to