Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

gdbstub: disable break on entering debug ROM

  • Loading branch information...
commit 86601afbe541d836145d4e3fad059ca46f63954b 1 parent 900ca7a
@sbourdeauducq sbourdeauducq authored
Showing with 64 additions and 56 deletions.
  1. +55 −55 cores/monitor/rtl/gdbstub.rom
  2. +9 −1 software/gdbstub/gdbstub.c
View
110 cores/monitor/rtl/gdbstub.rom
@@ -177,7 +177,7 @@ c3a00000
7802e000
58410000
78021000
-38420f48
+38420f58
28410000
28220000
20420002
@@ -202,7 +202,7 @@ c3a00000
3441ffc9
c3a00000
78041000
-38840f98
+38840fa8
e000000d
40250000
3463ffff
@@ -293,7 +293,7 @@ c3a00000
b8205800
29620084
78011000
-38210f90
+38210fa0
20420007
b4220800
10230000
@@ -303,7 +303,7 @@ b4220800
14640004
30410000
78011000
-38210f98
+38210fa8
2063000f
2084000f
b4242000
@@ -354,7 +354,7 @@ c3a00000
780d1000
780b1000
39ad1804
-396b0f50
+396b0f60
3410002b
34010024
fbffff49
@@ -446,10 +446,10 @@ b4823800
e0000002
fbffff20
78011000
-38210f64
+38210f74
e0000003
78011000
-38210f68
+38210f78
fbffffc3
2b9d0004
2b8b0008
@@ -474,17 +474,21 @@ c3a00000
5b9b0008
5b9d0004
78021000
-38420f4c
+38420f58
b8206800
28410000
+78031000
+38630f5c
+58200000
+28610000
28220000
5c400004
34020001
58220000
-fbfffebb
-78031000
-38630f48
-28610000
+fbfffeb7
+78081000
+39080f58
+29010000
28220000
20420002
5c40fffe
@@ -495,8 +499,8 @@ fbfffebb
237b0002
44220004
b9a00800
-fbffff2e
-fbffff67
+fbffff2a
+fbffff63
78101000
780c1000
78171000
@@ -511,20 +515,20 @@ fbffff67
398c1b28
3af71800
3ad61b2b
-39ef0f68
-3ab50f70
-3a730f64
+39ef0f78
+3ab50f80
+3a730f74
396b1e50
39ce1e4c
3a521e64
32000000
34190024
34180023
-fbfffe9d
+fbfffe99
5c39ffff
34110000
34140000
-fbfffe99
+fbfffe95
b8201000
4439fffc
44380008
@@ -532,35 +536,35 @@ b681a000
b5910800
30220000
36310001
-3408031f
+3401031f
229400ff
-4d11fff6
+4c31fff6
b5918800
32200000
5c58ffef
-fbfffe8b
+fbfffe87
202100ff
-fbfffe9b
+fbfffe97
3c210004
203100ff
-fbfffe86
+fbfffe82
202100ff
-fbfffe96
+fbfffe92
b6210800
202100ff
46810004
3401002d
-fbfffe88
+fbfffe84
e3ffffe1
3401002b
-fbfffe85
+fbfffe81
11820002
3401003a
5c410005
11810000
-fbfffe80
+fbfffe7c
11810001
-fbfffe7e
+fbfffe7a
11830000
34010001
32e10000
@@ -607,7 +611,7 @@ e000000c
5c610149
e0000071
b9a00800
-fbfffebe
+fbfffeba
e0000145
b9a00800
ba001000
@@ -623,7 +627,7 @@ e0000040
5b810050
3782004c
37810050
-fbfffe8e
+fbfffe8a
4c010121
2b810050
10220000
@@ -633,43 +637,43 @@ fbfffe8e
5c41011b
37810050
37820048
-fbfffe84
+fbfffe80
4c010117
2b830048
3401018f
54610114
2b81004c
ba001000
-fbfffe49
+fbfffe45
5c200124
78011000
-38210f6c
+38210f7c
e000014a
34010000
e0000002
34010001
-fbffff08
+fbffff04
e000011c
78011000
38211b29
5b810050
3782004c
37810050
-fbfffe6e
+fbfffe6a
4c010101
2b81004c
ba001000
34030004
3c210002
b5a10800
-fbfffe33
+fbfffe2f
e000010e
78011000
38211b29
5b810050
3782004c
37810050
-fbfffe60
+fbfffe5c
4c0100f3
2b810050
3402003d
@@ -681,7 +685,7 @@ fbfffe60
34030004
3c420002
b5a21000
-fbfffe33
+fbfffe2f
e00000e3
d1000000
d2000000
@@ -694,16 +698,16 @@ d2600000
34010044
5c6100f3
78011000
-38210f64
-fbfffece
-fbfffe9f
+38210f74
+fbfffeca
+fbfffe9b
e00000ee
78011000
38211b29
5b810050
3782004c
37810050
-fbfffe3e
+fbfffe3a
4c010003
2b81004c
59a10080
@@ -724,7 +728,7 @@ e00000da
5e2100c0
37810050
3782004c
-fbfffe29
+fbfffe25
4c0100bc
2b820050
10410000
@@ -733,7 +737,7 @@ fbfffe29
5c3100b7
37810050
37820048
-fbfffe20
+fbfffe1c
4c0100b3
11820001
34010032
@@ -923,7 +927,7 @@ e000000e
78021000
78031000
38421b29
-38630f74
+38630f84
40440000
40610000
5c810007
@@ -933,7 +937,7 @@ e000000e
34420001
34630001
e3fffff8
-fbfffdb2
+fbfffdae
e3fffe5f
d0600000
34000000
@@ -949,7 +953,7 @@ d0800000
34010002
d0410000
78031000
-38630f48
+38630f58
28610000
34020001
58220000
@@ -973,8 +977,8 @@ d0410000
379c0050
c3a00000
78011000
-38210f80
-fbfffdb7
+38210f90
+fbfffdb3
e3ffffd6
e000000c
e0001030
@@ -1001,11 +1005,7 @@ e0001030
38396162
63646566
00000000
-4b5fadb1
-00000000
-00000000
-00000000
-00000000
+2ede0489
00000000
00000000
00000000
View
10 software/gdbstub/gdbstub.c
@@ -666,12 +666,20 @@ static void cmd_query(void)
#endif
/*
- * This function does all command procesing for interfacing to gdb. The error
+ * This function does all command processing for interfacing to gdb. The error
* codes we return are errno numbers.
*/
void handle_exception(unsigned int *registers)
{
int irq;
+
+ /* make sure break is disabled.
+ * we can enter the stub with break enabled when the application calls it.
+ * there is a race condition here if the break is asserted before
+ * this line is executed, but the race window is small. to prevent it completely,
+ * applications should disable debug exceptions before jumping to debug ROM.
+ */
+ CSR_UART_BREAK = 0;
/* clear BSS there was a board reset */
if (!CSR_DBG_SCRATCHPAD) {
Please sign in to comment.
Something went wrong with that request. Please try again.