Remove the Xresume* labels from the i386 interrupt handlers; the

code in ipl.s and icu_ipl.s that used them was removed when the
interrupt thread system was committed. Debuggers also knew about
Xresume* because these labels hide the real names of the interrupt
handlers (Xintr*), and debuggers need to special-case interrupt
handlers to get the interrupt frame.

Both gdb and ddb will now use the Xintr* and Xfastintr* symbols to
detect interrupt frames. Fast interrupt frames were never identified
correctly before, so this fixes the problem of the running stack
frame getting lost in a ddb or gdb trace generated from a fast
interrupt - e.g. when debugging a simple infinite loop in the kernel
using a serial console, the frame containing the loop would never
appear in a gdb or ddb trace.

Reviewed by:	jhb, bde
This commit is contained in:
Ian Dowse 2001-10-09 19:54:52 +00:00
parent 7e3e8e556f
commit 3c7bcedd06
12 changed files with 14 additions and 17 deletions

View File

@ -125,7 +125,8 @@ static CORE_ADDR pcpu;
* Symbol names of kernel entry points. Use special frames.
*/
#define KSYM_TRAP "calltrap"
#define KSYM_INTERRUPT "Xresume"
#define KSYM_INTR "Xintr"
#define KSYM_FASTINTR "Xfastintr"
#define KSYM_SYSCALL "Xsyscall"
/*
@ -160,7 +161,9 @@ struct frame_info *fr;
if (sym != NULL) {
if (strcmp (SYMBOL_NAME(sym), KSYM_TRAP) == 0)
frametype = tf_trap;
else if (strncmp (SYMBOL_NAME(sym), KSYM_INTERRUPT, 7) == 0)
else if (strncmp (SYMBOL_NAME(sym), KSYM_INTR,
strlen(KSYM_INTR)) == 0 || strncmp (SYMBOL_NAME(sym),
KSYM_FASTINTR, strlen(KSYM_FASTINTR)) == 0)
frametype = tf_interrupt;
else if (strcmp (SYMBOL_NAME(sym), KSYM_SYSCALL) == 0)
frametype = tf_syscall;

View File

@ -125,7 +125,8 @@ static CORE_ADDR pcpu;
* Symbol names of kernel entry points. Use special frames.
*/
#define KSYM_TRAP "calltrap"
#define KSYM_INTERRUPT "Xresume"
#define KSYM_INTR "Xintr"
#define KSYM_FASTINTR "Xfastintr"
#define KSYM_SYSCALL "Xsyscall"
/*
@ -160,7 +161,9 @@ struct frame_info *fr;
if (sym != NULL) {
if (strcmp (SYMBOL_NAME(sym), KSYM_TRAP) == 0)
frametype = tf_trap;
else if (strncmp (SYMBOL_NAME(sym), KSYM_INTERRUPT, 7) == 0)
else if (strncmp (SYMBOL_NAME(sym), KSYM_INTR,
strlen(KSYM_INTR)) == 0 || strncmp (SYMBOL_NAME(sym),
KSYM_FASTINTR, strlen(KSYM_FASTINTR)) == 0)
frametype = tf_interrupt;
else if (strcmp (SYMBOL_NAME(sym), KSYM_SYSCALL) == 0)
frametype = tf_syscall;

View File

@ -155,8 +155,6 @@ IDTVEC(vec_name) ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
; \
/* entry point used by doreti_unpend for HWIs. */ \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid dbl cnt */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \

View File

@ -223,7 +223,8 @@ db_nextframe(fp, ip, p)
if (name != NULL) {
if (!strcmp(name, "calltrap")) {
frame_type = TRAP;
} else if (!strncmp(name, "Xresume", 7)) {
} else if (!strncmp(name, "Xintr", 5) ||
!strncmp(name, "Xfastintr", 9)) {
frame_type = INTERRUPT;
} else if (!strcmp(name, "syscall_with_err_pushed")) {
frame_type = SYSCALL;

View File

@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \

View File

@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \

View File

@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \

View File

@ -155,8 +155,6 @@ IDTVEC(vec_name) ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
; \
/* entry point used by doreti_unpend for HWIs. */ \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid dbl cnt */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \

View File

@ -223,7 +223,8 @@ db_nextframe(fp, ip, p)
if (name != NULL) {
if (!strcmp(name, "calltrap")) {
frame_type = TRAP;
} else if (!strncmp(name, "Xresume", 7)) {
} else if (!strncmp(name, "Xintr", 5) ||
!strncmp(name, "Xfastintr", 9)) {
frame_type = INTERRUPT;
} else if (!strcmp(name, "syscall_with_err_pushed")) {
frame_type = SYSCALL;

View File

@ -155,8 +155,6 @@ IDTVEC(vec_name) ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
; \
/* entry point used by doreti_unpend for HWIs. */ \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid dbl cnt */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \

View File

@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \

View File

@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \