annotate packages/hal/common/current/include/generic-stub.h @ 3292:7f8e529b4d82 default tip

Fix FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF() so it works with negative offsets.
author vae
date Wed, 29 Apr 2015 23:31:48 +0000
parents 74dbf4c3f2e1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
64
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
1 //========================================================================
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
2 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
3 // generic-stub.h
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
4 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
5 // Definitions for the generic GDB remote stub
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
6 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
7 //========================================================================
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
8 // ####ECOSGPLCOPYRIGHTBEGIN####
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
9 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
10 // This file is part of eCos, the Embedded Configurable Operating System.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
11 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 191
diff changeset
12 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
13 // eCos is free software; you can redistribute it and/or modify it under
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
14 // the terms of the GNU General Public License as published by the Free
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
15 // Software Foundation; either version 2 or (at your option) any later
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
16 // version.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 191
diff changeset
17 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
18 // eCos is distributed in the hope that it will be useful, but WITHOUT
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
19 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
20 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
21 // for more details.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 191
diff changeset
22 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
23 // You should have received a copy of the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
24 // along with eCos; if not, write to the Free Software Foundation, Inc.,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
25 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 191
diff changeset
26 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
27 // As a special exception, if other files instantiate templates or use
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
28 // macros or inline functions from this file, or you compile this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
29 // and link it with other works to produce a work based on this file,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
30 // this file does not by itself cause the resulting work to be covered by
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
31 // the GNU General Public License. However the source code for this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
32 // must still be made available in accordance with section (3) of the GNU
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
33 // General Public License v2.
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 191
diff changeset
34 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
35 // This exception does not invalidate any other reasons why a work based
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
36 // on this file might be covered by the GNU General Public License.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
37 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 895
diff changeset
38 // ####ECOSGPLCOPYRIGHTEND####
64
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
39 //========================================================================
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
40 //#####DESCRIPTIONBEGIN####
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
41 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
42 // Author(s): Red Hat, nickg
115
6ed91473a1cd Merge from eCos master repository on 2000-08-21-22:40:54-BST
jlarmour
parents: 112
diff changeset
43 // Contributors: Red Hat, nickg, dmoseley
64
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
44 // Date: 1998-06-08
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
45 // Purpose:
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
46 // Description: Definitions for the generic GDB remote stub
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
47 // Usage: This header is not to be included by user code, and is
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
48 // only placed in a publically accessible directory so
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
49 // that platform stub packages are able to include it
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
50 // if required.
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
51 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
52 //####DESCRIPTIONEND####
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
53 //
c38311975d4f Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents: 54
diff changeset
54 //========================================================================
54
f10165814f1e Merge from eCos master repository on 1999-11-19-22:24:39-GMT
jlarmour
parents: 34
diff changeset
55
f10165814f1e Merge from eCos master repository on 1999-11-19-22:24:39-GMT
jlarmour
parents: 34
diff changeset
56
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
57 #ifndef GENERIC_STUB_H
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
58 #define GENERIC_STUB_H
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
59
76
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
60 #ifdef __cplusplus
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
61 extern "C" {
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
62 #endif
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
63
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
64 /* Three typedefs must be provided before including this file.
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
65 target_register_t should correspond to the largest register value on
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
66 this target processor.
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
67 regnames_t corresponds to a type representing a register number.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
68 uint32 must correspond to at least a 32-bit unsigned integer type
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
69 (it may be larger). */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
70
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
71 #ifndef ASM
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
72
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
73 #ifndef __ECOS__
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
74 #include "dbg-serial.h"
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
75 #endif // __ECOS__
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
76
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
77 struct gdb_packet
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
78 {
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
79 /* The checksum calculated so far. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
80 uint32 checksum;
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
81 /* The checksum we've received from the remote side. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
82 uint32 xmitcsum;
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
83 /* Contents of the accumulated packet. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
84 char *contents;
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
85 /* Number of characters received. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
86 uint32 length;
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
87 /*
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
88 * state is the current state:
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
89 * 0 = looking for start of packet
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
90 * 1 = got start of packet, looking for # terminator
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
91 * 2 = looking for first byte of checksum
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
92 * 3 = looking for second byte of checksum (indicating end of packet)
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
93 */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
94 char state;
191
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
95 char err; // This is set if the packet should be tossed because of overflow
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
96 };
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
97
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
98 /* Return the currently-saved value corresponding to register REG. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
99 extern target_register_t get_register (regnames_t reg);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
100
191
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
101 /* Write the contents of register WHICH into VALUE as raw bytes */
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
102 extern int get_register_as_bytes (regnames_t which, char *value);
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
103
115
6ed91473a1cd Merge from eCos master repository on 2000-08-21-22:40:54-BST
jlarmour
parents: 112
diff changeset
104 #ifdef CYGHWR_REGISTER_VALIDITY_CHECKING
6ed91473a1cd Merge from eCos master repository on 2000-08-21-22:40:54-BST
jlarmour
parents: 112
diff changeset
105 // Return the validity of register REG.
6ed91473a1cd Merge from eCos master repository on 2000-08-21-22:40:54-BST
jlarmour
parents: 112
diff changeset
106 extern int get_register_valid (regnames_t reg);
6ed91473a1cd Merge from eCos master repository on 2000-08-21-22:40:54-BST
jlarmour
parents: 112
diff changeset
107 #endif
6ed91473a1cd Merge from eCos master repository on 2000-08-21-22:40:54-BST
jlarmour
parents: 112
diff changeset
108
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
109 /* Store VALUE in the register corresponding to WHICH. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
110 extern void put_register (regnames_t which, target_register_t value);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
111
191
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
112 extern int put_register_as_bytes (regnames_t which, char *value);
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
113
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
114 /* Set the next instruction to be executed when the user program resumes
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
115 execution to PC. */
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
116 #if !defined(SET_PC_PROTOTYPE_EXISTS) && !defined(set_pc)
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
117 #define SET_PC_PROTOTYPE_EXISTS
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
118 extern void set_pc (target_register_t pc);
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
119 #endif
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
120
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
121 /* Set the return value of the currently-pending syscall to VALUE. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
122 extern void set_syscall_value (target_register_t value);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
123
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
124 /* Return the Nth argument to the currently-pending syscall (starting from
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
125 0). */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
126 extern target_register_t get_syscall_arg (int n);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
127
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
128 /* Initialize the stub. This will also install any trap handlers needed by
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
129 the stub. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
130 extern void initialize_stub (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
131
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
132 /* Initialize the hardware. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
133 extern void initHardware (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
134
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
135 /* Skip the current instruction. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
136 extern void __skipinst (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
137
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
138 /* If the address in the PC register corresponds to the breakpoint()
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
139 instruction, return a non-zero value. */
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
140 #ifndef __is_breakpoint_function
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
141 extern int __is_breakpoint_function (void);
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
142 #endif
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
143
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
144 /* Execute a breakpoint instruction. Restarting will cause the instruction
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
145 to be skipped. */
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
146 #ifndef breakpoint
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
147 extern void breakpoint (void);
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
148 #endif
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
149
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
150 /* Return the syscall # corresponding to this system call. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
151 extern int __get_syscall_num (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
152
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
153 /* Transfer exception event processing to the stub. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
154 extern void __switch_to_stub (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
155
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
156 /* Send an exit packet containing the specified status. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
157 extern void __send_exit_status (int status);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
158
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
159 /* Copy COUNT bytes of memory from ADDR to BUF.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
160 ADDR is assumed to live in the user program's space.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
161 Returns number of bytes successfully read
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
162 (caller must check to see if less than requested). */
34
29bc183297e1 Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents: 2
diff changeset
163 extern int __read_mem_safe (void *buf,
29bc183297e1 Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents: 2
diff changeset
164 void *addr,
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
165 int count);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
166
156
b939e9cada46 Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents: 115
diff changeset
167 extern int __read_progmem_safe (void *buf,
b939e9cada46 Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents: 115
diff changeset
168 void *addr,
b939e9cada46 Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents: 115
diff changeset
169 int count);
b939e9cada46 Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents: 115
diff changeset
170
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
171 /* Copy COUNT bytes of memory from BUF to ADDR.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
172 ADDR is assumed to live in the user program's space.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
173 Returns number of bytes successfully read
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
174 (caller must check to see if less than requested). */
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
175 #ifndef __write_mem_safe
34
29bc183297e1 Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents: 2
diff changeset
176 extern int __write_mem_safe (void *buf,
29bc183297e1 Merge from eCos master repository on 1999-09-02-16:26:10-BST
jlarmour
parents: 2
diff changeset
177 void *addr,
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
178 int count);
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
179 #endif
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
180
156
b939e9cada46 Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents: 115
diff changeset
181 extern int __write_progmem_safe (void *buf,
b939e9cada46 Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents: 115
diff changeset
182 void *addr,
b939e9cada46 Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents: 115
diff changeset
183 int count);
b939e9cada46 Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents: 115
diff changeset
184
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
185 /* Set to a non-zero value if a memory fault occurs while
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
186 __set_mem_fault_trap () is running. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
187 extern volatile int __mem_fault;
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
188
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
189 #ifndef __ECOS__
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
190 #if 1
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
191 #include "stub-tservice.h" /* target dependent stub services */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
192 #else
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
193 /* Flush the instruction cache. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
194 extern void flush_i_cache (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
195
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
196 /* Flush the data cache. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
197 extern void __flush_d_cache (void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
198
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
199 typedef enum {
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
200 CACHE_NOOP, CACHE_ENABLE, CACHE_DISABLE, CACHE_FLUSH
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
201 } cache_control_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
202
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
203 /* Perform the specified operation on the instruction cache.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
204 Returns 1 if the cache is enabled, 0 otherwise. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
205 extern int __instruction_cache (cache_control_t request);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
206 /* Perform the specified operation on the data cache.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
207 Returns 1 if the cache is enabled, 0 otherwise. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
208 extern int __data_cache (cache_control_t request);
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
209 #endif
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
210 #endif // __ECOS__
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
211
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
212 /* Write the 'T' packet in BUFFER. SIGVAL is the signal the program
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
213 received. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
214 extern void __build_t_packet (int sigval, char *buffer);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
215
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
216 /* Return 1 when a complete packet has been received, 0 if the packet
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
217 is not yet complete, or -1 if an erroneous packet was NAKed. */
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
218 int __add_char_to_packet (unsigned character, struct gdb_packet *packet);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
219
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
220 typedef int (*__PFI)(int);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
221 typedef void (*__PFV)(void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
222
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
223 /* When an exception occurs, __process_exception_vec will be invoked with
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
224 the signal number corresponding to the trap/exception. The function
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
225 should return zero if it wishes execution to resume from the saved
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
226 register values; a non-zero value indicates that the exception handler
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
227 should be reinvoked. */
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
228 #if !defined(PROCESS_EXCEPTION_VEC_PROTOTYPE_EXISTS)
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
229 #define PROCESS_EXCEPTION_VEC_PROTOTYPE_EXISTS
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
230 extern volatile __PFI __process_exception_vec;
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
231 #endif
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
232
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
233 /* __process_exit_vec is invoked when a 'k' kill packet is received
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
234 from GDB. */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
235 extern volatile __PFV __process_exit_vec;
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
236
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
237 /* If SIGSYSCALL is defined, and such a signal value is returned from
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
238 __computeSignal (), the function pointed to by this vector will
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
239 be invoked.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
240
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
241 If the return value is negative, the user program is assumed to
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
242 have received the corresponding positive signal value, and an
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
243 exception will be processed. Otherwise, the user program is
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
244 restarted from the next instruction. */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
245 extern volatile __PFI __process_syscall_vec;
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
246
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
247 /* A continue packet was received from GDB with a signal value. The function
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
248 pointed to by __process_signal_vec will be invoked with this signal
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
249 value.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
250
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
251 If a zero value is returned, we will ignore the signal, and proceed
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
252 with the continue request. Otherwise, the program will be killed
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
253 with the signal. */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
254 extern volatile __PFI __process_signal_vec;
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
255
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
256 /* If non-NULL, __init_vec is called right before the user program is
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
257 resumed. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
258 extern volatile __PFV __init_vec;
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
259 /* if non-NULL, __cleanup_vec is called after the user program takes
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
260 an exception. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
261 extern volatile __PFV __cleanup_vec;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
262
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
263 /* Send an 'O' packet to GDB containing STR. */
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
264 extern int __output_gdb_string (target_register_t addr, int string_len);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
265
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
266 /* Request MAXLEN bytes of input from GDB to be stored in DEST. If BLOCK
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
267 is set, GDB should block until MAXLEN bytes are available to be
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
268 read; otherwise, it will return immediately with whatever data is
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
269 available.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
270 The return value is the number of bytes written into DEST. */
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
271 extern int __get_gdb_input (target_register_t dest, int maxlen, int block);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
272
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
273 /* Return the ASCII equivalent of C (C>=0 && C<=15). The result will be
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
274 lower-case. */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
275 extern char __tohex (int c);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
276
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
277 /* Convert COUNT bytes of the memory region in MEM to a hexadecimal
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
278 string in DEST.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
279 The resulting string will contain 2*COUNT characters.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
280 If MAY_FAULT is non-zero, memory faults are trapped; if a fault occurs,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
281 a NULL value will be returned.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
282 The value returned is one byte past the end of the string written. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
283 extern char *__mem2hex (char *mem, char *dest, int count, int may_fault);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
284
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
285 /* Given a hexadecimal string in MEM, write the equivalent bytes to DEST.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
286 The string is assumed to contain 2*COUNT characters.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
287 If MAY_FAULT is non-zero, memory faults are trapped; if a fault occurs,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
288 a NULL value will be returned.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
289 Otherwise, the value returned is one byte past the last byte written. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
290 extern char *__hex2mem (char *buf, char *mem, int count, int may_fault);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
291
895
4747af8ef0ef Leave out unused static buffers if not supporting program args.
gthomas
parents: 317
diff changeset
292 #ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
293 /* Set the program arguments passed into the user program's main */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
294 extern void __set_program_args (int argc, char **argv);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
295
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
296 /* Return the user program arguments passed in from GDB (via an 'A'
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
297 packet). argcPtr is a pointer into the user program, which will hold
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
298 the number of arguments; the strings are returned. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
299 extern char **__get_program_args (target_register_t argcPtr);
895
4747af8ef0ef Leave out unused static buffers if not supporting program args.
gthomas
parents: 317
diff changeset
300 #endif
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
301
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
302 /* Encode PACKET as a remote protocol packet and send it to GDB; this takes
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
303 care of sending the initial '$' character, as well as the trailing '#'
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
304 and checksum, and also waits for an ACK from the remote side, resending
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
305 as necessary. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
306 extern void __putpacket (char *packet);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
307
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 191
diff changeset
308 /* Retrieve the next remote protocol packet from GDB, taking care of verifying
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 191
diff changeset
309 the checksum and sending an ACK when necessary. */
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 191
diff changeset
310 extern void __getpacket (char *buffer);
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 191
diff changeset
311
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
312 /* Convert the hexadecimal string pointed to by *PTR into an integer,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
313 and store it in the value pointed to by INTVALUE. The number of
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
314 characters read from *PTR will be returned; *PTR will point to the first
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
315 non-hexadecmial character encountered. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
316 extern unsigned int __hexToInt (char **ptr, target_register_t *intValue);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
317
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
318 /* Convert the value in INTVALUE into a string of hexadecimal
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
319 characters stored in PTR. NUMBITS are the number of bits to use
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
320 in INTVALUE. The number of characters written to PTR will be returned. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
321 extern unsigned int __intToHex (char *ptr,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
322 target_register_t intValue,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
323 int numBits);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
324
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
325 /* Handle an exception, usually some sort of hardware or software trap.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
326 This is responsible for communicating the exception to GDB. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
327 extern void __handle_exception (void);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
328
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
329 /* Send a 'X' packet with signal SIGVAL to GDB. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
330 extern void __kill_program (int sigval);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
331
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
332 /* Given a packet pointed to by PACKETCONTENTS, decode it and respond to
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
333 GDB appropriately. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
334 extern int __process_packet (char *packetContents);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
335
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
336 /* Write the C-style string pointed to by STR to the GDB comm port.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
337 Used for printing debug messages. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
338 extern void __putDebugStr (char *str);
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
339
112
02ea4320376c Merge from eCos master repository on 2000-07-21-21:01:39-BST
jlarmour
parents: 76
diff changeset
340 #if defined(NO_MALLOC) && !defined(MAX_BP_NUM)
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
341 #define MAX_BP_NUM 64 /* Maximum allowed # of breakpoints */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
342 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
343
191
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
344 extern int hal_syscall_handler(void);
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
345 extern int __is_bsp_syscall(void);
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
346
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
347 extern void __install_breakpoint_list (void);
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
348 extern void __clear_breakpoint_list (void);
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
349 extern int __display_breakpoint_list (void (*print_func)(target_register_t));
678094f34118 Merge from eCos master repository on 2001-10-19-06:43:02-BST
jlarmour
parents: 156
diff changeset
350
317
4882695334f2 HW watch/breakpoint support change
msalter
parents: 210
diff changeset
351 /* 'Z' packet types */
4882695334f2 HW watch/breakpoint support change
msalter
parents: 210
diff changeset
352 #define ZTYPE_SW_BREAKPOINT 0
4882695334f2 HW watch/breakpoint support change
msalter
parents: 210
diff changeset
353 #define ZTYPE_HW_BREAKPOINT 1
4882695334f2 HW watch/breakpoint support change
msalter
parents: 210
diff changeset
354 #define ZTYPE_HW_WATCHPOINT_WRITE 2
4882695334f2 HW watch/breakpoint support change
msalter
parents: 210
diff changeset
355 #define ZTYPE_HW_WATCHPOINT_READ 3
4882695334f2 HW watch/breakpoint support change
msalter
parents: 210
diff changeset
356 #define ZTYPE_HW_WATCHPOINT_ACCESS 4
4882695334f2 HW watch/breakpoint support change
msalter
parents: 210
diff changeset
357
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
358 #endif /* ASM */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
359
76
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
360 #ifdef __cplusplus
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
361 } /* extern "C" */
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
362 #endif
435cced73e2f eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
jlarmour
parents: 66
diff changeset
363
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
364 #endif /* GENERIC_STUB_H */