Changeset 1916d1f in mainline for kernel/arch/mips64/include/debugger.h
- Timestamp:
- 2011-07-12T13:41:26Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 50fc490
- Parents:
- 11809eab (diff), 6817eba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips64/include/debugger.h
r11809eab r1916d1f 1 1 /* 2 * Copyright (c) 200 6 Jakub Jermar2 * Copyright (c) 2005 Ondrej Palkovsky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #ifndef KERN_FHC_H_ 30 #define KERN_FHC_H_ 29 /** @addtogroup mips64 30 * @{ 31 */ 32 /** @file 33 */ 31 34 32 #include <genarch/ofw/ofw_tree.h> 33 #include <typedefs.h> 34 #include <ddi/irq.h> 35 #ifndef KERN_mips64_DEBUGGER_H_ 36 #define KERN_mips64_DEBUGGER_H_ 37 38 #include <arch/exception.h> 35 39 #include <typedefs.h> 36 40 37 typedef struct { 38 uint64_t addr; 39 uint32_t size; 40 } __attribute__ ((packed)) ofw_fhc_reg_t; 41 #define BKPOINTS_MAX 10 41 42 42 typedef struct { 43 uint64_t child_base; 44 uint64_t parent_base; 45 uint32_t size; 46 } __attribute__ ((packed)) ofw_fhc_range_t; 43 /** Breakpoint was shot */ 44 #define BKPOINT_INPROG (1 << 0) 47 45 48 typedef struct { 49 uint64_t addr; 50 uint32_t size; 51 } __attribute__ ((packed)) ofw_central_reg_t; 46 /** One-time breakpoint, mandatory for j/b instructions */ 47 #define BKPOINT_ONESHOT (1 << 1) 52 48 53 typedef struct { 54 uint64_t child_base; 55 uint64_t parent_base; 56 uint32_t size; 57 } __attribute__ ((packed)) ofw_central_range_t; 49 /** 50 * Breakpoint is set on the next instruction, so that it 51 * could be reinstalled on the previous one 52 */ 53 #define BKPOINT_REINST (1 << 2) 58 54 59 extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *, ofw_fhc_reg_t *, 60 uintptr_t *); 61 extern bool ofw_central_apply_ranges(ofw_tree_node_t *, ofw_central_reg_t *, 62 uintptr_t *); 55 /** Call a predefined function */ 56 #define BKPOINT_FUNCCALL (1 << 3) 63 57 64 extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *, ofw_fhc_reg_t *, 65 uint32_t, int *, cir_t *, void **); 58 59 typedef struct { 60 uintptr_t address; /**< Breakpoint address */ 61 sysarg_t instruction; /**< Original instruction */ 62 sysarg_t nextinstruction; /**< Original instruction following break */ 63 unsigned int flags; /**< Flags regarding breakpoint */ 64 size_t counter; 65 void (*bkfunc)(void *, istate_t *); 66 } bpinfo_t; 67 68 extern bpinfo_t breakpoints[BKPOINTS_MAX]; 69 70 extern bool is_jump(sysarg_t); 71 72 extern void debugger_init(void); 73 extern void debugger_bpoint(istate_t *); 66 74 67 75 #endif 76 77 /** @} 78 */
Note:
See TracChangeset
for help on using the changeset viewer.