1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Experimental calls to stop_cpus()/restart_cpus() within breakpoint calls.

Turned off by default in smptests.h.
This commit is contained in:
Steve Passe 1997-06-27 23:24:38 +00:00
parent 3984ec7e1f
commit b1c3894d1b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=27004
2 changed files with 40 additions and 2 deletions

View File

@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: db_interface.c,v 1.28 1997/04/26 11:45:03 peter Exp $
* $Id: db_interface.c,v 1.1 1997/06/26 18:40:55 smp Exp smp $
*/
/*
@ -38,6 +38,10 @@
#include <machine/cons.h>
#include <machine/md_var.h>
#include <machine/segments.h>
#ifdef SMP
#include <machine/smp.h>
#include <machine/smptests.h> /** TEST_CPUSTOP */
#endif
#include <vm/vm.h>
#include <vm/vm_param.h>
@ -134,6 +138,11 @@ kdb_trap(type, code, regs)
cnpollc(TRUE);
#if defined(SMP) && defined(TEST_CPUSTOP)
/* we stopp all CPUs except ourselves (obviously) */
stop_cpus(other_cpus);
#endif /* SMP && TEST_CPUSTOP */
(void) setjmp(db_global_jmpbuf);
db_global_jmpbuf_valid = TRUE;
if (ddb_mode)
@ -142,6 +151,16 @@ kdb_trap(type, code, regs)
gdb_handle_exception(&ddb_regs, type, code);
db_global_jmpbuf_valid = FALSE;
#if defined(SMP) && defined(TEST_CPUSTOP)
/* restart all the CPUs we previously stopped */
if (stopped_cpus != other_cpus) {
db_printf("whoa, other_cpus: 0x%08x, stopped_cpus: 0x%08x\n",
other_cpus, stopped_cpus);
cngetc();
}
restart_cpus(stopped_cpus);
#endif /* SMP && TEST_CPUSTOP */
cnpollc(FALSE);
regs->tf_eip = ddb_regs.tf_eip;

View File

@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: db_interface.c,v 1.28 1997/04/26 11:45:03 peter Exp $
* $Id: db_interface.c,v 1.1 1997/06/26 18:40:55 smp Exp smp $
*/
/*
@ -38,6 +38,10 @@
#include <machine/cons.h>
#include <machine/md_var.h>
#include <machine/segments.h>
#ifdef SMP
#include <machine/smp.h>
#include <machine/smptests.h> /** TEST_CPUSTOP */
#endif
#include <vm/vm.h>
#include <vm/vm_param.h>
@ -134,6 +138,11 @@ kdb_trap(type, code, regs)
cnpollc(TRUE);
#if defined(SMP) && defined(TEST_CPUSTOP)
/* we stopp all CPUs except ourselves (obviously) */
stop_cpus(other_cpus);
#endif /* SMP && TEST_CPUSTOP */
(void) setjmp(db_global_jmpbuf);
db_global_jmpbuf_valid = TRUE;
if (ddb_mode)
@ -142,6 +151,16 @@ kdb_trap(type, code, regs)
gdb_handle_exception(&ddb_regs, type, code);
db_global_jmpbuf_valid = FALSE;
#if defined(SMP) && defined(TEST_CPUSTOP)
/* restart all the CPUs we previously stopped */
if (stopped_cpus != other_cpus) {
db_printf("whoa, other_cpus: 0x%08x, stopped_cpus: 0x%08x\n",
other_cpus, stopped_cpus);
cngetc();
}
restart_cpus(stopped_cpus);
#endif /* SMP && TEST_CPUSTOP */
cnpollc(FALSE);
regs->tf_eip = ddb_regs.tf_eip;