Deleted Added
sdiff udiff text old ( 70861 ) new ( 74903 )
full compact
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 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;
312 critical_t savecrit;
313
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
323 if (atomic_cmpset_acq_int(&in_Debugger, 0, 1)) {
324 savecrit = critical_enter();
325 db_printf("Debugger(\"%s\")\n", msg);
326 breakpoint();
327 critical_exit(savecrit);
328 atomic_store_rel_int(&in_Debugger, 0);
329 }
330}