db_machdep.h (719) | db_machdep.h (2578) |
---|---|
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 * $Id: db_machdep.h,v 1.2 1993/10/16 14:39:10 rgrimes Exp $ | 26 * $Id: db_machdep.h,v 1.3 1993/11/07 17:42:50 wollman Exp $ |
27 */ 28 29#ifndef _I386_DB_MACHDEP_H_ 30#define _I386_DB_MACHDEP_H_ 31 32/* 33 * Machine-dependent defines for new kernel debugger. 34 */ 35 | 27 */ 28 29#ifndef _I386_DB_MACHDEP_H_ 30#define _I386_DB_MACHDEP_H_ 31 32/* 33 * Machine-dependent defines for new kernel debugger. 34 */ 35 |
36 | |
37/* #include <mach/i386/vm_types.h> */ 38/* #include <mach/i386/vm_param.h> */ 39#include <vm/vm_prot.h> 40#include <vm/vm_param.h> 41#include <vm/vm_inherit.h> 42#include <vm/lock.h> 43/* #include <i386/thread.h> */ /* for thread_status */ | 36/* #include <mach/i386/vm_types.h> */ 37/* #include <mach/i386/vm_param.h> */ 38#include <vm/vm_prot.h> 39#include <vm/vm_param.h> 40#include <vm/vm_inherit.h> 41#include <vm/lock.h> 42/* #include <i386/thread.h> */ /* for thread_status */ |
44#include | 43#include <machine/frame.h> /* for struct trapframe */ |
45/* #include <i386/eflags.h> */ | 44/* #include <i386/eflags.h> */ |
46#include <machine/eflags.h> /* from Mach... */ | 45#include <machine/psl.h> |
47/* #include <i386/trap.h> */ 48#include <machine/trap.h> 49 50#define i386_saved_state trapframe | 46/* #include <i386/trap.h> */ 47#include <machine/trap.h> 48 49#define i386_saved_state trapframe |
51/* end of mangling */ | |
52 53typedef vm_offset_t db_addr_t; /* address - unsigned */ 54typedef int db_expr_t; /* expression - signed */ 55 56typedef struct i386_saved_state db_regs_t; 57extern db_regs_t ddb_regs; /* register state */ 58#define DDB_REGS (&ddb_regs) 59 60#define PC_REGS(regs) ((db_addr_t)(regs)->tf_eip) 61 62#define BKPT_INST 0xcc /* breakpoint instruction */ 63#define BKPT_SIZE (1) /* size of breakpoint inst */ 64#define BKPT_SET(inst) (BKPT_INST) 65 66#define FIXUP_PC_AFTER_BREAK ddb_regs.tf_eip -= 1; 67 | 50 51typedef vm_offset_t db_addr_t; /* address - unsigned */ 52typedef int db_expr_t; /* expression - signed */ 53 54typedef struct i386_saved_state db_regs_t; 55extern db_regs_t ddb_regs; /* register state */ 56#define DDB_REGS (&ddb_regs) 57 58#define PC_REGS(regs) ((db_addr_t)(regs)->tf_eip) 59 60#define BKPT_INST 0xcc /* breakpoint instruction */ 61#define BKPT_SIZE (1) /* size of breakpoint inst */ 62#define BKPT_SET(inst) (BKPT_INST) 63 64#define FIXUP_PC_AFTER_BREAK ddb_regs.tf_eip -= 1; 65 |
68#define db_clear_single_step(regs) ((regs)->tf_eflags &= ~EFL_TF) 69#define db_set_single_step(regs) ((regs)->tf_eflags |= EFL_TF) | 66#define db_clear_single_step(regs) ((regs)->tf_eflags &= ~PSL_T) 67#define db_set_single_step(regs) ((regs)->tf_eflags |= PSL_T) |
70 71/* #define IS_BREAKPOINT_TRAP(type, code) ((type) == T_INT3) */ 72/* #define IS_WATCHPOINT_TRAP(type, code) ((type) == T_WATCHPOINT) */ | 68 69/* #define IS_BREAKPOINT_TRAP(type, code) ((type) == T_INT3) */ 70/* #define IS_WATCHPOINT_TRAP(type, code) ((type) == T_WATCHPOINT) */ |
73/* using the 386bsd values, rather than the Mach ones: */ | 71/* using the FreeBSD values, rather than the Mach ones: */ |
74#define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BPTFLT) 75#define IS_WATCHPOINT_TRAP(type, code) ((type) == T_KDBTRAP) 76 77#define I_CALL 0xe8 78#define I_CALLI 0xff 79#define I_RET 0xc3 80#define I_IRET 0xcf 81 --- 39 unchanged lines hidden --- | 72#define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BPTFLT) 73#define IS_WATCHPOINT_TRAP(type, code) ((type) == T_KDBTRAP) 74 75#define I_CALL 0xe8 76#define I_CALLI 0xff 77#define I_RET 0xc3 78#define I_IRET 0xcf 79 --- 39 unchanged lines hidden --- |