Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 clean up the check for tracing into a s...
details: https://anonhg.NetBSD.org/src/rev/7bd99695abcb
branches: trunk
changeset: 756122:7bd99695abcb
user: chs <chs%NetBSD.org@localhost>
date: Wed Jul 07 01:15:34 2010 +0000
description:
clean up the check for tracing into a syscall handler.
diffstat:
sys/arch/amd64/amd64/trap.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (56 lines):
diff -r 125dc7eee639 -r 7bd99695abcb sys/arch/amd64/amd64/trap.c
--- a/sys/arch/amd64/amd64/trap.c Wed Jul 07 01:14:52 2010 +0000
+++ b/sys/arch/amd64/amd64/trap.c Wed Jul 07 01:15:34 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.62 2010/04/23 19:18:09 rmind Exp $ */
+/* $NetBSD: trap.c,v 1.63 2010/07/07 01:15:34 chs Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.62 2010/04/23 19:18:09 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.63 2010/07/07 01:15:34 chs Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -197,6 +197,7 @@
* exception has been processed. Note that the effect is as if the arguments
* were passed call by reference.
*/
+
void
trap(struct trapframe *frame)
{
@@ -206,6 +207,8 @@
extern char fusuintrfailure[], kcopy_fault[],
resume_iret[];
extern char IDTVEC(oosyscall)[];
+ extern char IDTVEC(osyscall)[];
+ extern char IDTVEC(syscall32)[];
#if 0
extern char resume_pop_ds[], resume_pop_es[];
#endif
@@ -642,9 +645,9 @@
case T_TRCTRAP:
/* Check whether they single-stepped into a lcall. */
- if (frame->tf_rip == (int)IDTVEC(oosyscall))
- return;
- if (frame->tf_rip == (int)IDTVEC(oosyscall) + 1) {
+ if (frame->tf_rip == (uint64_t)IDTVEC(oosyscall) ||
+ frame->tf_rip == (uint64_t)IDTVEC(osyscall) ||
+ frame->tf_rip == (uint64_t)IDTVEC(syscall32)) {
frame->tf_rflags &= ~PSL_T;
return;
}
@@ -655,6 +658,7 @@
/*
* Don't go single-stepping into a RAS.
*/
+
if (p->p_raslist == NULL ||
(ras_lookup(p, (void *)frame->tf_rip) == (void *)-1)) {
KSI_INIT_TRAP(&ksi);
Home |
Main Index |
Thread Index |
Old Index