diff options
-rw-r--r-- | sys/amd64/amd64/db_trace.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/exception.S | 16 | ||||
-rw-r--r-- | sys/amd64/amd64/exception.s | 16 | ||||
-rw-r--r-- | sys/i386/i386/db_trace.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/exception.s | 16 |
5 files changed, 48 insertions, 8 deletions
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index f34747c..8ac4c01 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -226,7 +226,9 @@ db_nextframe(fp, ip, p) } else if (!strncmp(name, "Xintr", 5) || !strncmp(name, "Xfastintr", 9)) { frame_type = INTERRUPT; - } else if (!strcmp(name, "syscall_with_err_pushed")) { + } else if (!strcmp(name, "Xlcall_syscall")) { + frame_type = SYSCALL; + } else if (!strcmp(name, "Xint0x80_syscall")) { frame_type = SYSCALL; } } diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S index 89bfb13..8eeacbc 100644 --- a/sys/amd64/amd64/exception.S +++ b/sys/amd64/amd64/exception.S @@ -191,7 +191,20 @@ IDTVEC(lcall_syscall) pushfl /* save eflags */ popl 8(%esp) /* shuffle into tf_eflags */ pushl $7 /* sizeof "lcall 7,0" */ - jmp syscall_with_err_pushed + subl $4,%esp /* skip over tf_trapno */ + pushal + pushl %ds + pushl %es + pushl %fs + mov $KDSEL,%ax /* switch to kernel segments */ + mov %ax,%ds + mov %ax,%es + mov $KPSEL,%ax + mov %ax,%fs + FAKE_MCOUNT(13*4(%esp)) + call syscall + MEXITCOUNT + jmp doreti /* * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) @@ -203,7 +216,6 @@ IDTVEC(lcall_syscall) SUPERALIGN_TEXT IDTVEC(int0x80_syscall) pushl $2 /* sizeof "int 0x80" */ -syscall_with_err_pushed: subl $4,%esp /* skip over tf_trapno */ pushal pushl %ds diff --git a/sys/amd64/amd64/exception.s b/sys/amd64/amd64/exception.s index 89bfb13..8eeacbc 100644 --- a/sys/amd64/amd64/exception.s +++ b/sys/amd64/amd64/exception.s @@ -191,7 +191,20 @@ IDTVEC(lcall_syscall) pushfl /* save eflags */ popl 8(%esp) /* shuffle into tf_eflags */ pushl $7 /* sizeof "lcall 7,0" */ - jmp syscall_with_err_pushed + subl $4,%esp /* skip over tf_trapno */ + pushal + pushl %ds + pushl %es + pushl %fs + mov $KDSEL,%ax /* switch to kernel segments */ + mov %ax,%ds + mov %ax,%es + mov $KPSEL,%ax + mov %ax,%fs + FAKE_MCOUNT(13*4(%esp)) + call syscall + MEXITCOUNT + jmp doreti /* * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) @@ -203,7 +216,6 @@ IDTVEC(lcall_syscall) SUPERALIGN_TEXT IDTVEC(int0x80_syscall) pushl $2 /* sizeof "int 0x80" */ -syscall_with_err_pushed: subl $4,%esp /* skip over tf_trapno */ pushal pushl %ds diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c index f34747c..8ac4c01 100644 --- a/sys/i386/i386/db_trace.c +++ b/sys/i386/i386/db_trace.c @@ -226,7 +226,9 @@ db_nextframe(fp, ip, p) } else if (!strncmp(name, "Xintr", 5) || !strncmp(name, "Xfastintr", 9)) { frame_type = INTERRUPT; - } else if (!strcmp(name, "syscall_with_err_pushed")) { + } else if (!strcmp(name, "Xlcall_syscall")) { + frame_type = SYSCALL; + } else if (!strcmp(name, "Xint0x80_syscall")) { frame_type = SYSCALL; } } diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s index 89bfb13..8eeacbc 100644 --- a/sys/i386/i386/exception.s +++ b/sys/i386/i386/exception.s @@ -191,7 +191,20 @@ IDTVEC(lcall_syscall) pushfl /* save eflags */ popl 8(%esp) /* shuffle into tf_eflags */ pushl $7 /* sizeof "lcall 7,0" */ - jmp syscall_with_err_pushed + subl $4,%esp /* skip over tf_trapno */ + pushal + pushl %ds + pushl %es + pushl %fs + mov $KDSEL,%ax /* switch to kernel segments */ + mov %ax,%ds + mov %ax,%es + mov $KPSEL,%ax + mov %ax,%fs + FAKE_MCOUNT(13*4(%esp)) + call syscall + MEXITCOUNT + jmp doreti /* * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) @@ -203,7 +216,6 @@ IDTVEC(lcall_syscall) SUPERALIGN_TEXT IDTVEC(int0x80_syscall) pushl $2 /* sizeof "int 0x80" */ -syscall_with_err_pushed: subl $4,%esp /* skip over tf_trapno */ pushal pushl %ds |