Deleted Added
full compact
db_interface.c (70861) db_interface.c (74903)
1/*
2 * Mach Operating System
3 * Copyright (c) 1991,1990 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the

--- 9 unchanged lines hidden (view full) ---

18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie the
24 * rights to redistribute these changes.
25 *
1/*
2 * Mach Operating System
3 * Copyright (c) 1991,1990 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the

--- 9 unchanged lines hidden (view full) ---

18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie the
24 * rights to redistribute these changes.
25 *
26 * $FreeBSD: head/sys/amd64/amd64/db_interface.c 70861 2001-01-10 04:43:51Z jake $
26 * $FreeBSD: head/sys/amd64/amd64/db_interface.c 74903 2001-03-28 03:06:10Z jhb $
27 */
28
29/*
30 * Interface to new debugger.
31 */
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/reboot.h>

--- 269 unchanged lines hidden (view full) ---

304 * Move this to machdep.c and allow it to be called if any debugger is
305 * installed.
306 */
307void
308Debugger(msg)
309 const char *msg;
310{
311 static volatile u_int in_Debugger;
27 */
28
29/*
30 * Interface to new debugger.
31 */
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/reboot.h>

--- 269 unchanged lines hidden (view full) ---

304 * Move this to machdep.c and allow it to be called if any debugger is
305 * installed.
306 */
307void
308Debugger(msg)
309 const char *msg;
310{
311 static volatile u_int in_Debugger;
312 int flags;
312 critical_t savecrit;
313
313 /*
314 * XXX
315 * Do nothing if the console is in graphics mode. This is
316 * OK if the call is for the debugger hotkey but not if the call
317 * is a weak form of panicing.
318 */
319 if (cons_unavail && !(boothowto & RB_GDB))
320 return;
321
314 /*
315 * XXX
316 * Do nothing if the console is in graphics mode. This is
317 * OK if the call is for the debugger hotkey but not if the call
318 * is a weak form of panicing.
319 */
320 if (cons_unavail && !(boothowto & RB_GDB))
321 return;
322
322 if (atomic_cmpset_int(&in_Debugger, 0, 1)) {
323 flags = save_intr();
324 disable_intr();
323 if (atomic_cmpset_acq_int(&in_Debugger, 0, 1)) {
324 savecrit = critical_enter();
325 db_printf("Debugger(\"%s\")\n", msg);
326 breakpoint();
325 db_printf("Debugger(\"%s\")\n", msg);
326 breakpoint();
327 restore_intr(flags);
328 in_Debugger = 0;
327 critical_exit(savecrit);
328 atomic_store_rel_int(&in_Debugger, 0);
329 }
330}
329 }
330}