Deleted Added
full compact
db_interface.c (122849) db_interface.c (125467)
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

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

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
27#include <sys/cdefs.h>
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

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

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/amd64/amd64/db_interface.c 122849 2003-11-17 08:58:16Z peter $");
28__FBSDID("$FreeBSD: head/sys/amd64/amd64/db_interface.c 125467 2004-02-05 01:56:43Z kan $");
29
30/*
31 * Interface to new debugger.
32 */
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/reboot.h>
36#include <sys/cons.h>

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

82 * XXX try to do nothing if the console is in graphics mode.
83 * Handle trace traps (and hardware breakpoints...) by ignoring
84 * them except for forgetting about them. Return 0 for other
85 * traps to say that we haven't done anything. The trap handler
86 * will usually panic. We should handle breakpoint traps for
87 * our breakpoints by disarming our breakpoints and fixing up
88 * %eip.
89 */
29
30/*
31 * Interface to new debugger.
32 */
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/reboot.h>
36#include <sys/cons.h>

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

82 * XXX try to do nothing if the console is in graphics mode.
83 * Handle trace traps (and hardware breakpoints...) by ignoring
84 * them except for forgetting about them. Return 0 for other
85 * traps to say that we haven't done anything. The trap handler
86 * will usually panic. We should handle breakpoint traps for
87 * our breakpoints by disarming our breakpoints and fixing up
88 * %eip.
89 */
90 if (cons_unavail && ddb_mode) {
90 if (cn_unavailable() != 0 && ddb_mode) {
91 if (type == T_TRCTRAP) {
92 regs->tf_rflags &= ~PSL_T;
93 return (1);
94 }
95 return (0);
96 }
97
98 ef = read_rflags();

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

322 static volatile u_int in_Debugger;
323
324 /*
325 * XXX
326 * Do nothing if the console is in graphics mode. This is
327 * OK if the call is for the debugger hotkey but not if the call
328 * is a weak form of panicing.
329 */
91 if (type == T_TRCTRAP) {
92 regs->tf_rflags &= ~PSL_T;
93 return (1);
94 }
95 return (0);
96 }
97
98 ef = read_rflags();

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

322 static volatile u_int in_Debugger;
323
324 /*
325 * XXX
326 * Do nothing if the console is in graphics mode. This is
327 * OK if the call is for the debugger hotkey but not if the call
328 * is a weak form of panicing.
329 */
330 if (cons_unavail && !(boothowto & RB_GDB))
330 if (cn_unavailable() != 0 && !(boothowto & RB_GDB))
331 return;
332
333 if (atomic_cmpset_acq_int(&in_Debugger, 0, 1)) {
334 db_printf("Debugger(\"%s\")\n", msg);
335 breakpoint();
336 atomic_store_rel_int(&in_Debugger, 0);
337 }
338}
339
340void
341db_show_mdpcpu(struct pcpu *pc)
342{
343
344#if 0
345 db_printf("currentldt = 0x%x\n", pc->pc_currentldt);
346#endif
347}
331 return;
332
333 if (atomic_cmpset_acq_int(&in_Debugger, 0, 1)) {
334 db_printf("Debugger(\"%s\")\n", msg);
335 breakpoint();
336 atomic_store_rel_int(&in_Debugger, 0);
337 }
338}
339
340void
341db_show_mdpcpu(struct pcpu *pc)
342{
343
344#if 0
345 db_printf("currentldt = 0x%x\n", pc->pc_currentldt);
346#endif
347}