4 #define MDBVERSION "2.6"
7 #define MINIX_SYMBOLS 1
17 #ifndef SYSCALLS_SUPPORT
18 #define SYSCALLS_SUPPORT 0
32 #define EXTRA_SYMBOLS GNU_SUPPORT
34 #define EXTRA_SYMBOLS 0
38 #include <minix/config.h>
39 #include <sys/types.h>
41 #include <minix/const.h>
42 #include <minix/type.h>
46 #include <minix/ipc.h>
49 #undef printf /* defined as printk in <minix/const.h> */
54 #error "Unsupported arch"
58 #define BP_OFF ((long)&((struct proc *)0)->p_reg.a6)
59 #define PC_MEMBER(rp) ((rp)->p_reg.pc)
60 #define PC_OFF ((long)&((struct proc *)0)->p_reg.pc)
61 #define SP_MEMBER(rp) ((rp)->p_reg.sp)
62 #define PSW_MEMBER(rp) ((rp)->p_reg.psw)
66 #define BP_OFF ((long)&((struct proc *)0)->p_reg.fp)
67 #define PC_MEMBER(rp) ((rp)->p_reg.pc)
68 #define PC_OFF ((long)&((struct proc *)0)->p_reg.pc)
71 #define ADDRSIZE (sizeof(void *))
72 #define BITSIZE(size) (8 * (size))
73 #define INTSIZE (sizeof(int)) /* not quite right for cross-debugger */
74 #define LONGSIZE (sizeof(long))
75 #define UCHAR(x) ((x) & 0xFF)
76 #define NOSEG (-1) /* no segment */
78 /* use hardware codes for segments for simplest decoding */
79 #define CSEG 0x2E /* 8088 through 80386 */
83 #define N_REG16 4 /* 16 bit registers at start of stackframe */
87 #define ADDA(l) ((u16_t) (l) == 0xC481)
90 #define ADDA_CNT(l) ((i32_t) (l))
92 #define ADDA_CNT(l) ((i16_t) (l))
95 #define ADDQ(l) ((u16_t) (l) == 0xC483)
96 #define ADDQ_CNT(l) (((((l) >> 16) + 128) & 0x000000FF) - 128)
97 #define BREAK(l) (0x000000CC | ((l) & 0xFFFFFF00))
98 #define BREAKPOINT_ADVANCE 1
99 #define INCSP2(l) ((u16_t) (l) == 0x4444)
100 #define POPBX2(l) ((u16_t) (l) == 0x5B5B)
101 #define POPBX(l) ( (l & 0xFF) == 0x5B)
103 /* Added for ANSI CC */
104 #define POPCX2(l) ((u16_t) (l) == 0x5959)
105 #define POPCX(l) ( (l & 0xFF) == 0x59)
110 #define ADDA(l) ((int)((l) >> 16) == 0xDFFC)
111 #define ADDA_CNT(l) (l)
112 #define ADDQ(l) (((l >> 16) & 0xF13F) == 0x500F)
113 #define ADDQ_CNT(l) (((((l) >> 25) - 1) & 7) + 1)
114 #define BREAK(l) (0xA0000000 | ((l) & 0xFFFF))
115 #define BREAKPOINT_ADVANCE 0
116 #define BYTES_SWAPPED /* this assumes WORDS_SWAPPED too */
117 #define LEA(l) (((l) >> 16) == 0x4FEF)
118 #define LEA_DISP(l) ((long)( l & 0xFFFF))
121 #define MASK(size) ((size) >= LONGSIZE ? -1L : (1L << BITSIZE(size)) - 1)
124 #define SHIFT(size) BITSIZE(LONGSIZE - (size))
126 #define SHIFT(size) (0)
134 extern long lbuf
[]; /* buffer for proc */
136 EXTERN
long st_addr
; /* starting address of text */
137 EXTERN
long et_addr
; /* ending address of text */
138 EXTERN
long sd_addr
; /* starting address of data */
139 EXTERN
long ed_addr
; /* ending address of data */
140 EXTERN
long end_addr
; /* ending address of text/data */
141 EXTERN
long sk_addr
; /* starting address of stack */
142 EXTERN
long sk_size
; /* size of stack */
143 EXTERN
int curpid
; /* current pid of process/core */
144 EXTERN
int corepid
; /* pid of core file */
145 EXTERN
int coreonly
; /* core file only */
146 EXTERN
int fileonly
; /* file only */
147 EXTERN
int cursig
; /* current signal */
148 EXTERN
int seg
; /* segment */
149 EXTERN
int is_separate
; /* separate I & D */
150 EXTERN
int paging
; /* paging flag */
152 EXTERN
int debug
; /* debug flag */
155 EXTERN
int syscalls
; /* trace syscalls */
160 #define EXTERN extern