Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/include/db_machdep.h
Show All 27 Lines | |||||
*/ | */ | ||||
#ifndef _MACHINE_DB_MACHDEP_H_ | #ifndef _MACHINE_DB_MACHDEP_H_ | ||||
#define _MACHINE_DB_MACHDEP_H_ | #define _MACHINE_DB_MACHDEP_H_ | ||||
#include <machine/frame.h> | #include <machine/frame.h> | ||||
#include <machine/trap.h> | #include <machine/trap.h> | ||||
#include <machine/armreg.h> | #include <machine/armreg.h> | ||||
#include <machine/acle-compat.h> | |||||
#define T_BREAKPOINT (1) | #define T_BREAKPOINT (1) | ||||
#define T_WATCHPOINT (2) | |||||
typedef vm_offset_t db_addr_t; | typedef vm_offset_t db_addr_t; | ||||
typedef int db_expr_t; | typedef int db_expr_t; | ||||
#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_regs.sf_pc) | #define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_regs.sf_pc) | ||||
#define BKPT_INST (KERNEL_BREAKPOINT) | #define BKPT_INST (KERNEL_BREAKPOINT) | ||||
#define BKPT_SIZE (INSN_SIZE) | #define BKPT_SIZE (INSN_SIZE) | ||||
#define BKPT_SET(inst) (BKPT_INST) | #define BKPT_SET(inst) (BKPT_INST) | ||||
#define BKPT_SKIP do { \ | #define BKPT_SKIP do { \ | ||||
kdb_frame->tf_pc += BKPT_SIZE; \ | kdb_frame->tf_pc += BKPT_SIZE; \ | ||||
} while (0) | } while (0) | ||||
#if __ARM_ARCH >= 6 | |||||
#define db_clear_single_step kdb_cpu_clear_singlestep | |||||
#define db_set_single_step kdb_cpu_set_singlestep | |||||
#define db_pc_is_singlestep kdb_cpu_pc_is_singlestep | |||||
#else | |||||
#define SOFTWARE_SSTEP 1 | #define SOFTWARE_SSTEP 1 | ||||
#endif | |||||
andrewUnsubmitted Done Inline Actionsandrew: ```
#include <machine/acle-compat.h>
...
#if __ARM_ARCH >= 6
``` | |||||
#define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT) | #define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT) | ||||
#define IS_WATCHPOINT_TRAP(type, code) (0) | #define IS_WATCHPOINT_TRAP(type, code) (type == T_WATCHPOINT) | ||||
#define inst_trap_return(ins) (0) | #define inst_trap_return(ins) (0) | ||||
/* ldmxx reg, {..., pc} | /* ldmxx reg, {..., pc} | ||||
01800000 stack mode | 01800000 stack mode | ||||
000f0000 register | 000f0000 register | ||||
0000ffff register list */ | 0000ffff register list */ | ||||
/* mov pc, reg | /* mov pc, reg | ||||
0000000f register */ | 0000000f register */ | ||||
Show All 35 Lines |