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 oops, my previous commit is bad. re...
details: https://anonhg.NetBSD.org/src/rev/45aaefa05c07
branches: trunk
changeset: 370660:45aaefa05c07
user: ryo <ryo%NetBSD.org@localhost>
date: Thu Sep 22 21:48:18 2022 +0000
description:
oops, my previous commit is bad. revert previous.
<frame-address> is a frame pointer, not a trapframe, and it worked correctly. (e.g., trace $x29)
diffstat:
sys/arch/aarch64/aarch64/db_trace.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diffs (50 lines):
diff -r 07d728b85bbb -r 45aaefa05c07 sys/arch/aarch64/aarch64/db_trace.c
--- a/sys/arch/aarch64/aarch64/db_trace.c Thu Sep 22 21:40:42 2022 +0000
+++ b/sys/arch/aarch64/aarch64/db_trace.c Thu Sep 22 21:48:18 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.22 2022/09/22 21:00:46 ryo Exp $ */
+/* $NetBSD: db_trace.c,v 1.23 2022/09/22 21:48:18 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.22 2022/09/22 21:00:46 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.23 2022/09/22 21:48:18 ryo Exp $");
#include <sys/param.h>
#include <sys/bitops.h>
@@ -497,6 +497,15 @@
db_addr_t pc, sp, lr0;
bool allow_leaf_function = false;
+ if (tf == NULL) {
+ /*
+ * In the case of "trace/s <frame-address>",
+ * the specified frame pointer address is considered
+ * a trapframe (or a switchframe) address.
+ */
+ tf = (struct trapframe *)fp;
+ }
+
pr_frame(tf, pr);
db_read_bytes((db_addr_t)tf, sizeof(tf_buf), (char *)&tf_buf);
@@ -801,15 +810,6 @@
if (count > MAXBACKTRACE)
count = MAXBACKTRACE;
- if (tf == NULL) {
- /*
- * In the case of "trace <frame-address>",
- * the specified frame pointer address is considered
- * a trapframe (or a switchframe) address.
- */
- tf = (struct trapframe *)fp;
- }
-
if (trace_sp) {
/* trace $lr pushed to sp */
db_sp_trace(tf, fp, count, flags, pr);
Home |
Main Index |
Thread Index |
Old Index