Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 don't depend on clang code to backt...
details: https://anonhg.NetBSD.org/src/rev/e18f276a76bd
branches: trunk
changeset: 363503:e18f276a76bd
user: ryo <ryo%NetBSD.org@localhost>
date: Mon Jul 30 15:59:44 2018 +0000
description:
don't depend on clang code to backtrace. keep trapframe as framepointer if DDB.
diffstat:
sys/arch/aarch64/aarch64/db_trace.c | 6 +++---
sys/arch/aarch64/aarch64/vectors.S | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 1de958ed56dc -r e18f276a76bd sys/arch/aarch64/aarch64/db_trace.c
--- a/sys/arch/aarch64/aarch64/db_trace.c Mon Jul 30 09:08:41 2018 +0000
+++ b/sys/arch/aarch64/aarch64/db_trace.c Mon Jul 30 15:59:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.3 2018/07/17 00:31:22 christos Exp $ */
+/* $NetBSD: db_trace.c,v 1.4 2018/07/30 15:59:44 ryo Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.3 2018/07/17 00:31:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.4 2018/07/30 15:59:44 ryo Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -248,7 +248,7 @@
if (((char *)(lr - 4) == (char *)el0_trap) ||
((char *)(lr - 4) == (char *)el1_trap)) {
- tf = (struct trapframe *)(lastfp + 16);
+ tf = (struct trapframe *)fp;
lastfp = (uint64_t)tf;
lastlr = lr;
diff -r 1de958ed56dc -r e18f276a76bd sys/arch/aarch64/aarch64/vectors.S
--- a/sys/arch/aarch64/aarch64/vectors.S Mon Jul 30 09:08:41 2018 +0000
+++ b/sys/arch/aarch64/aarch64/vectors.S Mon Jul 30 15:59:44 2018 +0000
@@ -1,7 +1,8 @@
-/* $NetBSD: vectors.S,v 1.6 2018/07/17 10:01:59 ryo Exp $ */
+/* $NetBSD: vectors.S,v 1.7 2018/07/30 15:59:44 ryo Exp $ */
#include <aarch64/asm.h>
#include "assym.h"
+#include "opt_ddb.h"
/*
* vector_entry macro must be small enough to fit 0x80 bytes!
@@ -69,6 +70,9 @@
adr x30, el\el\()_trap_exit /* el[01]_trap_exit */
mov x0, sp
+#ifdef DDB
+ mov x29, sp /* for backtrace */
+#endif
b \label
.endm
Home |
Main Index |
Thread Index |
Old Index