@@ -138,7 +138,7 @@ static void ATTR_GDBFN keepWDTalive() {
138
138
//of the hex string, as far as the routine has read into it. Bits/4 indicates
139
139
//the max amount of hex chars it gobbles up. Bits can be -1 to eat up as much
140
140
//hex chars as possible.
141
- static long /*ATTR_GDBFN*/ gdbGetHexVal (unsigned char * * ptr , int bits ) {
141
+ static long gdbGetHexVal (unsigned char * * ptr , int bits ) {
142
142
int i ;
143
143
int no ;
144
144
unsigned int v = 0 ;
@@ -176,22 +176,22 @@ static long /*ATTR_GDBFN*/ gdbGetHexVal(unsigned char **ptr, int bits) {
176
176
}
177
177
178
178
//Swap an int into the form gdb wants it
179
- static int /*ATTR_GDBFN*/ iswap (int i ) {
179
+ static int iswap (int i ) {
180
180
return ((i >> 24 ) & 0xff )
181
181
| (((i >> 16 ) & 0xff ) << 8 )
182
182
| (((i >> 8 ) & 0xff ) << 16 )
183
183
| (((i >> 0 ) & 0xff ) << 24 );
184
184
}
185
185
186
186
//Read a byte from the ESP8266 memory.
187
- static unsigned char /*ATTR_GDBFN*/ readbyte (unsigned int p ) {
187
+ static unsigned char readbyte (unsigned int p ) {
188
188
if (p < 0x20000000 || p >= 0x60000000 ) return -1 ;
189
189
int * i = (int * )(p & ~3 );
190
190
return * i >> ((p & 3 ) * 8 );
191
191
}
192
192
193
193
//Write a byte to the ESP8266 memory.
194
- static void /*ATTR_GDBFN*/ writeByte (unsigned int p , unsigned char d ) {
194
+ static void writeByte (unsigned int p , unsigned char d ) {
195
195
if (p < 0x20000000 || p >= 0x60000000 ) return ;
196
196
int * i = (int * )(p & ~3 );
197
197
if ((p & 3 ) == 0 ) * i = (* i & 0xffffff00 ) | (d << 0 );
@@ -201,7 +201,7 @@ static void /*ATTR_GDBFN*/ writeByte(unsigned int p, unsigned char d) {
201
201
}
202
202
203
203
//Returns 1 if it makes sense to write to addr p
204
- static int /*ATTR_GDBFN*/ validWrAddr (int p ) {
204
+ static int validWrAddr (int p ) {
205
205
return (p >= 0x3ff00000 && p < 0x40000000 )
206
206
|| (p >= 0x40100000 && p < 0x40140000 )
207
207
|| (p >= 0x60000000 && p < 0x60002000 );
@@ -217,29 +217,29 @@ static inline bool ATTR_GDBFN gdbTxFifoIsFull() {
217
217
}
218
218
219
219
//Receive a char from the uart. Uses polling and feeds the watchdog.
220
- static inline int /*ATTR_GDBFN*/ gdbRecvChar () {
220
+ static inline int gdbRecvChar () {
221
221
while (gdbRxFifoIsEmpty ()) {
222
222
keepWDTalive ();
223
223
}
224
224
return READ_PERI_REG (UART_FIFO (0 ));
225
225
}
226
226
227
227
//Send a char to the uart.
228
- static void /*ATTR_GDBFN*/ gdbSendChar (char c ) {
228
+ static void gdbSendChar (char c ) {
229
229
while (gdbTxFifoIsFull ())
230
230
;
231
231
WRITE_PERI_REG (UART_FIFO (0 ), c );
232
232
}
233
233
234
234
235
235
//Send the start of a packet; reset checksum calculation.
236
- static void /*ATTR_GDBFN*/ gdbPacketStart () {
236
+ static void gdbPacketStart () {
237
237
chsum = 0 ;
238
238
gdbSendChar ('$' );
239
239
}
240
240
241
241
//Send a char as part of a packet
242
- static void /*ATTR_GDBFN*/ gdbPacketChar (char c ) {
242
+ static void gdbPacketChar (char c ) {
243
243
if (c == '#' || c == '$' || c == '}' || c == '*' ) {
244
244
gdbSendChar ('}' );
245
245
chsum += '}' ;
@@ -250,7 +250,7 @@ static void /*ATTR_GDBFN*/ gdbPacketChar(char c) {
250
250
}
251
251
252
252
//Send a hex val as part of a packet. 'bits'/4 dictates the number of hex chars sent.
253
- static void /*ATTR_GDBFN*/ gdbPacketHex (int val , int bits ) {
253
+ static void gdbPacketHex (int val , int bits ) {
254
254
static const char hexChars [] = "0123456789abcdef" ;
255
255
int i ;
256
256
for (i = bits ; i > 0 ; i -= 4 ) {
@@ -259,24 +259,24 @@ static void /*ATTR_GDBFN*/ gdbPacketHex(int val, int bits) {
259
259
}
260
260
261
261
//Send a hex val as part of a packet. 'bits'/4 dictates the number of hex chars sent.
262
- static void /*ATTR_GDBFN*/ gdbPacketSwappedHexInt (int val ) {
262
+ static void gdbPacketSwappedHexInt (int val ) {
263
263
gdbPacketHex (iswap (val ), 32 );
264
264
}
265
265
266
- static void /*ATTR_GDBFN*/ gdbPacketXXXXInt () {
266
+ static void gdbPacketXXXXInt () {
267
267
for (int i = 0 ; i < 8 ; i ++ ) gdbPacketChar ('x' );
268
268
}
269
269
270
270
//Finish sending a packet.
271
- static void /*ATTR_GDBFN*/ gdbPacketEnd () {
271
+ static void gdbPacketEnd () {
272
272
gdbSendChar ('#' );
273
273
//Ok to use packet version here since hex char can never be an
274
274
//excape-requiring character
275
275
gdbPacketHex (chsum , 8 );
276
276
}
277
277
278
278
// Send a complete packet containing str
279
- static void /*ATTR_GDBFN*/ gdbSendPacketStr (const char * c ) {
279
+ static void gdbSendPacketStr (const char * c ) {
280
280
gdbPacketStart ();
281
281
while (* c != 0 ) {
282
282
gdbPacketChar (* c );
@@ -303,13 +303,13 @@ static inline void ATTR_GDBEXTERNFN gdbSendOutputPacketChar(unsigned char c) {
303
303
gdbPacketEnd ();
304
304
}
305
305
306
- static long /*ATTR_GDBFN*/ gdbGetSwappedHexInt (unsigned char * * ptr ) {
306
+ static long gdbGetSwappedHexInt (unsigned char * * ptr ) {
307
307
return iswap (gdbGetHexVal (ptr , 32 ));
308
308
}
309
309
310
310
311
311
//Send the reason execution is stopped to GDB.
312
- static void /*ATTR_GDBFN*/ sendReason () {
312
+ static void sendReason () {
313
313
static const char exceptionSignal [] = {4 ,31 ,11 ,11 ,2 ,6 ,8 ,0 ,6 ,7 ,0 ,0 ,7 ,7 ,7 ,7 };
314
314
#if 0
315
315
char * reason = "" ; //default
@@ -400,7 +400,7 @@ struct regfile {
400
400
*/
401
401
402
402
//Handle a command as received from GDB.
403
- static inline int /*ATTR_GDBFN*/ gdbHandleCommand () {
403
+ static inline int gdbHandleCommand () {
404
404
//Handle a command
405
405
int i , j , k ;
406
406
unsigned char * data = cmd + 1 ;
@@ -537,7 +537,7 @@ static inline int /*ATTR_GDBFN*/ gdbHandleCommand() {
537
537
//It is not necessary for gdb to be attached for it to be paused
538
538
//For example, during an exception break, the program is
539
539
// paused but gdb might not be attached yet
540
- static int /*ATTR_GDBFN*/ gdbReadCommand () {
540
+ static int gdbReadCommand () {
541
541
unsigned char chsum ;
542
542
unsigned char sentchs [2 ];
543
543
size_t p ;
@@ -606,7 +606,7 @@ static inline void ATTR_GDBFN setaregval(int reg, unsigned int val) {
606
606
}
607
607
608
608
//Emulate the l32i/s32i instruction we're stopped at.
609
- static inline void /*ATTR_GDBFN*/ emulLdSt () {
609
+ static inline void emulLdSt () {
610
610
unsigned char i0 = readbyte (gdbstub_savedRegs .pc );
611
611
unsigned char i1 = readbyte (gdbstub_savedRegs .pc + 1 );
612
612
unsigned char i2 ;
@@ -682,7 +682,7 @@ static void __attribute__((noinline)) gdbstub_handle_debug_exception_flash() {
682
682
#if GDBSTUB_BREAK_ON_EXCEPTION || GDBSTUB_CTRLC_BREAK
683
683
684
684
#if !GDBSTUB_FREERTOS
685
- static inline int /*ATTR_GDBFN*/ gdbReadCommandWithFrame (void * frame ) {
685
+ static inline int gdbReadCommandWithFrame (void * frame ) {
686
686
//Copy registers the Xtensa HAL did save to gdbstub_savedRegs
687
687
os_memcpy (& gdbstub_savedRegs , frame , 5 * 4 );
688
688
os_memcpy (& gdbstub_savedRegs .a [2 ], ((uint32_t * )frame ) + 5 , 14 * 4 );
0 commit comments