RTEMS: bsps/m68k/shared/gdbstub/gdb_if.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
gdb_if.h
Go to the documentation of this file.
1
9/*
10 * THIS SOFTWARE IS NOT COPYRIGHTED
11 *
12 * The following software is offered for use in the public domain.
13 * There is no warranty with regard to this software or its performance
14 * and the user must accept the software "AS IS" with all faults.
15 *
16 * THE CONTRIBUTORS DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, WITH
17 * REGARD TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 */
20
21#ifndef _GDB_IF_H
22#define _GDB_IF_H
23
32/* Max number of threads in qM response */
33#define QM_MAX_THREADS (20)
34
35struct rtems_gdb_stub_thread_info {
36 char display[256];
37 char name[256];
38 char more_display[256];
39};
40
41/*
42 * Prototypes
43 */
44
45int parse_zbreak(const char *in, int *type, unsigned char **addr, int *len);
46
47char* mem2hstr(char *buf, const unsigned char *mem, int count);
48int hstr2mem(unsigned char *mem, const char *buf, int count);
49void set_mem_err(void);
50unsigned char get_byte(const unsigned char *ptr);
51void set_byte(unsigned char *ptr, int val);
52char* thread2vhstr(char *buf, int thread);
53char* thread2fhstr(char *buf, int thread);
54const char* fhstr2thread(const char *buf, int *thread);
55const char* vhstr2thread(const char *buf, int *thread);
56char* int2fhstr(char *buf, int val);
57char* int2vhstr(char *buf, int vali);
58const char* fhstr2int(const char *buf, int *ival);
59const char* vhstr2int(const char *buf, int *ival);
60int hstr2byte(const char *buf, int *bval);
61int hstr2nibble(const char *buf, int *nibble);
62
63 Thread_Control *rtems_gdb_index_to_stub_id(int);
64int rtems_gdb_stub_thread_support_ok(void);
65int rtems_gdb_stub_get_current_thread(void);
66int rtems_gdb_stub_get_next_thread(int);
67int rtems_gdb_stub_get_offsets(
68 unsigned char **text_addr,
69 unsigned char **data_addr,
70 unsigned char **bss_addr
71);
72int rtems_gdb_stub_get_thread_regs(
73 int thread,
74 unsigned int *registers
75);
76int rtems_gdb_stub_set_thread_regs(
77 int thread,
78 unsigned int *registers
79);
80void rtems_gdb_process_query(
81 char *inbuffer,
82 char *outbuffer,
83 int do_threads,
84 int thread
85);
86
87#if defined (__mc68000__)
88/* there are 180 bytes of registers on a 68020 w/68881 */
89/* many of the fpa registers are 12 byte (96 bit) registers */
90#define NUMREGBYTES 180
91enum regnames {D0,D1,D2,D3,D4,D5,D6,D7,
92 A0,A1,A2,A3,A4,A5,A6,A7,
93 PS,PC,
94 FP0,FP1,FP2,FP3,FP4,FP5,FP6,FP7,
95 FPCONTROL,FPSTATUS,FPIADDR
96 };
97#elif defined (__mips__)
98/*
99 * MIPS registers, numbered in the order in which gdb expects to see them.
100 */
101#define ZERO 0
102#define AT 1
103#define V0 2
104#define V1 3
105#define A0 4
106#define A1 5
107#define A2 6
108#define A3 7
109
110#define T0 8
111#define T1 9
112#define T2 10
113#define T3 11
114#define T4 12
115#define T5 13
116#define T6 14
117#define T7 15
118
119#define S0 16
120#define S1 17
121#define S2 18
122#define S3 19
123#define S4 20
124#define S5 21
125#define S6 22
126#define S7 23
127
128#define T8 24
129#define T9 25
130#define K0 26
131#define K1 27
132#define GP 28
133#define SP 29
134#define S8 30
135#define RA 31
136
137#define SR 32
138#define LO 33
139#define HI 34
140#define BAD_VA 35
141#define CAUSE 36
142#define PC 37
143
144#define F0 38
145#define F1 39
146#define F2 40
147#define F3 41
148#define F4 42
149#define F5 43
150#define F6 44
151#define F7 45
152
153#define F8 46
154#define F9 47
155#define F10 48
156#define F11 49
157#define F12 50
158#define F13 51
159#define F14 52
160#define F15 53
161
162#define F16 54
163#define F17 55
164#define F18 56
165#define F19 57
166#define F20 58
167#define F21 59
168#define F22 60
169#define F23 61
170
171#define F24 62
172#define F25 63
173#define F26 64
174#define F27 65
175#define F28 66
176#define F29 67
177#define F30 68
178#define F31 69
179
180#define FCSR 70
181#define FIRR 71
182
183#define NUM_REGS 72
184
185void mips_gdb_stub_install(int enableThreads) ;
186#endif /* defined (__mips__) */
187
188#define MEMOPT_READABLE 1
189#define MEMOPT_WRITEABLE 2
190
191#define NUM_MEMSEGS 10
192
193int gdbstub_add_memsegment(unsigned,unsigned,int);
194
195#endif /* _GDB_IF_H */
_Thread_Control
Definition: thread.h:732
rtems_gdb_stub_thread_info
Definition: gdb_if.h:34