Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Fix tracedump() for sun3 and sun2 by adding __noinl...



details:   https://anonhg.NetBSD.org/src/rev/e07ac1b846e9
branches:  trunk
changeset: 975965:e07ac1b846e9
user:      rin <rin%NetBSD.org@localhost>
date:      Thu Sep 10 02:03:44 2020 +0000

description:
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.

diffstat:

 sys/arch/sun2/sun2/promlib.c |  6 +++---
 sys/arch/sun3/sun3/sunmon.c  |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 02bc68c989dc -r e07ac1b846e9 sys/arch/sun2/sun2/promlib.c
--- a/sys/arch/sun2/sun2/promlib.c      Thu Sep 10 01:53:22 2020 +0000
+++ b/sys/arch/sun2/sun2/promlib.c      Thu Sep 10 02:03:44 2020 +0000
@@ -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 @@
        int fr_arg[1];
 };
 /*VARARGS0*/
-static void 
+static void __noinline
 tracedump(int x1)
 {
        struct funcall_frame *fp = (struct funcall_frame *)(&x1 - 2);
diff -r 02bc68c989dc -r e07ac1b846e9 sys/arch/sun3/sun3/sunmon.c
--- a/sys/arch/sun3/sun3/sunmon.c       Thu Sep 10 01:53:22 2020 +0000
+++ b/sys/arch/sun3/sun3/sunmon.c       Thu Sep 10 02:03:44 2020 +0000
@@ -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 @@
        int fr_arg[1];
 };
 /*VARARGS0*/
-static void
+static void __noinline
 tracedump(int x1)
 {
        struct funcall_frame *fp = (struct funcall_frame *)(&x1 - 2);



Home | Main Index | Thread Index | Old Index