Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 Make traces work with ELF kernels.
details: https://anonhg.NetBSD.org/src/rev/ebb34b61dac4
branches: trunk
changeset: 473563:ebb34b61dac4
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Jun 07 07:00:07 1999 +0000
description:
Make traces work with ELF kernels.
diffstat:
sys/arch/i386/i386/db_trace.c | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diffs (44 lines):
diff -r cc28d17e1c2a -r ebb34b61dac4 sys/arch/i386/i386/db_trace.c
--- a/sys/arch/i386/i386/db_trace.c Mon Jun 07 06:13:41 1999 +0000
+++ b/sys/arch/i386/i386/db_trace.c Mon Jun 07 07:00:07 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.24 1999/04/12 20:38:19 pk Exp $ */
+/* $NetBSD: db_trace.c,v 1.25 1999/06/07 07:00:07 thorpej Exp $ */
/*
* Mach Operating System
@@ -260,6 +260,26 @@
}
}
if (INKERNEL((int)frame) && name) {
+#ifdef __ELF__
+ if (!strcmp(name, "trap")) {
+ is_trap = TRAP;
+ } else if (!strcmp(name, "syscall")) {
+ is_trap = SYSCALL;
+ } else if (name[0] == 'X') {
+ if (!strncmp(name, "Xintr", 5) ||
+ !strncmp(name, "Xresume", 7) ||
+ !strncmp(name, "Xstray", 6) ||
+ !strncmp(name, "Xhold", 5) ||
+ !strncmp(name, "Xrecurse", 8) ||
+ !strcmp(name, "Xdoreti") ||
+ !strncmp(name, "Xsoft", 5)) {
+ is_trap = INTERRUPT;
+ } else
+ goto normal;
+ } else
+ goto normal;
+ narg = 0;
+#else
if (!strcmp(name, "_trap")) {
is_trap = TRAP;
} else if (!strcmp(name, "_syscall")) {
@@ -278,6 +298,7 @@
} else
goto normal;
narg = 0;
+#endif /* __ELF__ */
} else {
normal:
is_trap = NONE;
Home |
Main Index |
Thread Index |
Old Index