Deleted Added
full compact
db_machdep.h (131952) db_machdep.h (135561)
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 Mellon
24 * the 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 Mellon
24 * the rights to redistribute these changes.
25 *
26 * $FreeBSD: head/sys/amd64/include/db_machdep.h 131952 2004-07-10 23:47:20Z marcel $
26 * $FreeBSD: head/sys/amd64/include/db_machdep.h 135561 2004-09-22 01:27:06Z peter $
27 */
28
29#ifndef _MACHINE_DB_MACHDEP_H_
30#define _MACHINE_DB_MACHDEP_H_
31
32#include <machine/frame.h>
33#include <machine/trap.h>
34
35typedef vm_offset_t db_addr_t; /* address - unsigned */
36typedef long db_expr_t; /* expression - signed */
37
38#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_rip)
39
40#define BKPT_INST 0xcc /* breakpoint instruction */
41#define BKPT_SIZE (1) /* size of breakpoint inst */
42#define BKPT_SET(inst) (BKPT_INST)
43
27 */
28
29#ifndef _MACHINE_DB_MACHDEP_H_
30#define _MACHINE_DB_MACHDEP_H_
31
32#include <machine/frame.h>
33#include <machine/trap.h>
34
35typedef vm_offset_t db_addr_t; /* address - unsigned */
36typedef long db_expr_t; /* expression - signed */
37
38#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_rip)
39
40#define BKPT_INST 0xcc /* breakpoint instruction */
41#define BKPT_SIZE (1) /* size of breakpoint inst */
42#define BKPT_SET(inst) (BKPT_INST)
43
44#define BKPT_SKIP kdb_frame->tf_rip += 1
44#define BKPT_SKIP \
45do { \
46 kdb_frame->tf_rip += 1; \
47 kdb_thrctx->pcb_rip += 1; \
48} while(0)
45
49
46#define FIXUP_PC_AFTER_BREAK kdb_frame->tf_rip -= 1;
50#define FIXUP_PC_AFTER_BREAK \
51do { \
52 kdb_frame->tf_rip -= 1; \
53 kdb_thrctx->pcb_rip -= 1; \
54} while(0);
47
48#define db_clear_single_step kdb_cpu_clear_singlestep
49#define db_set_single_step kdb_cpu_set_singlestep
50
51#define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BPTFLT)
52/*
53 * Watchpoints are not supported. The debug exception type is in %dr6
54 * and not yet in the args to this macro.

--- 32 unchanged lines hidden ---
55
56#define db_clear_single_step kdb_cpu_clear_singlestep
57#define db_set_single_step kdb_cpu_set_singlestep
58
59#define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BPTFLT)
60/*
61 * Watchpoints are not supported. The debug exception type is in %dr6
62 * and not yet in the args to this macro.

--- 32 unchanged lines hidden ---