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

4.104.114.84.95
Last change on this file since 45477a3 was a681285, checked in by Joel Sherrill <joel.sherrill@…>, on 08/14/02 at 22:58:30

2002-08-14 Greg Menke <gregory.menke@…>

  • mips-stub.c: Re-debugged a breakpoint problem, zbreak target address was a char * which caused the target instruction to not be fully copied, so the zbreak logic corrupted the original instruction and didn't insert a valid break instruction.
  • 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
35
36char* mem2hstr(char *buf, const unsigned char *mem, int count);
37int   hstr2mem(unsigned char *mem, const char *buf, int count);
38void  set_mem_err(void);
39unsigned char get_byte(const unsigned char *ptr);
40void  set_byte(unsigned char *ptr, int val);
41char* thread2vhstr(char *buf, int thread);
42char* thread2fhstr(char *buf, int thread);
43const char* fhstr2thread(const char *buf, int *thread);
44const char* vhstr2thread(const char *buf, int *thread);
45char* int2fhstr(char *buf, int val);
46char* int2vhstr(char *buf, int vali);
47const char* fhstr2int(const char *buf, int *ival);
48const char* vhstr2int(const char *buf, int *ival);
49int   hstr2byte(const char *buf, int *bval);
50int   hstr2nibble(const char *buf, int *nibble);
51
52Thread_Control *rtems_gdb_index_to_stub_id(int);
53int rtems_gdb_stub_thread_support_ok(void);
54int rtems_gdb_stub_get_current_thread(void);
55int rtems_gdb_stub_get_next_thread(int);
56int rtems_gdb_stub_get_offsets(
57  unsigned char **text_addr,
58  unsigned char **data_addr,
59  unsigned char **bss_addr
60);
61int rtems_gdb_stub_get_thread_regs(
62  int thread,
63  unsigned int *registers
64);
65int rtems_gdb_stub_set_thread_regs(
66  int thread,
67  unsigned int *registers
68);
69void rtems_gdb_process_query(
70  char *inbuffer,
71  char *outbuffer,
72  int   do_threads,
73  int   thread
74);
75
76/*
77 * MIPS registers, numbered in the order in which gdb expects to see them.
78 */
79#define ZERO            0
80#define AT              1
81#define V0              2
82#define V1              3
83#define A0              4
84#define A1              5
85#define A2              6
86#define A3              7
87
88#define T0              8
89#define T1              9
90#define T2              10
91#define T3              11
92#define T4              12
93#define T5              13
94#define T6              14
95#define T7              15
96
97#define S0              16
98#define S1              17
99#define S2              18
100#define S3              19
101#define S4              20
102#define S5              21
103#define S6              22
104#define S7              23
105
106#define T8              24
107#define T9              25
108#define K0              26
109#define K1              27
110#define GP              28
111#define SP              29
112#define S8              30
113#define RA              31
114
115#define SR              32
116#define LO              33
117#define HI              34
118#define BAD_VA          35
119#define CAUSE           36
120#define PC              37
121
122#define F0              38
123#define F1              39
124#define F2              40
125#define F3              41
126#define F4              42
127#define F5              43
128#define F6              44
129#define F7              45
130
131#define F8              46
132#define F9              47
133#define F10             48
134#define F11             49
135#define F12             50
136#define F13             51
137#define F14             52
138#define F15             53
139
140#define F16             54
141#define F17             55
142#define F18             56
143#define F19             57
144#define F20             58
145#define F21             59
146#define F22             60
147#define F23             61
148
149#define F24             62
150#define F25             63
151#define F26             64
152#define F27             65
153#define F28             66
154#define F29             67
155#define F30             68
156#define F31             69
157
158#define FCSR            70
159#define FIRR            71
160
161#define NUM_REGS        72
162
163
164
165
166
167
168void mips_gdb_stub_install(int enableThreads) ;
169
170
171#define MEMOPT_READABLE   1
172#define MEMOPT_WRITEABLE  2
173
174#ifndef NUM_MEMSEGS
175#define NUM_MEMSEGS     10
176#endif
177
178int gdbstub_add_memsegment(unsigned,unsigned,int);
179
180
181
182#endif /* _GDB_IF_H */
Note: See TracBrowser for help on using the repository browser.