source: rtems/c/src/lib/libbsp/mips/shared/gdbstub/gdb_if.h @ f05b2ac

4.104.114.84.95
Last change on this file since f05b2ac was f05b2ac, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/21/04 at 16:01:48

Remove duplicate white lines.

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