File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ void __wrap_system_restart_local() {
9090 register uint32_t sp asm (" a1" );
9191 uint32_t sp_dump = sp;
9292
93+ #if 0
9394 if (gdb_present()) {
9495 /* When GDBStub is present, exceptions are handled by GDBStub,
9596 but Soft WDT will still call this function.
@@ -98,6 +99,7 @@ void __wrap_system_restart_local() {
9899 break into GDB here. */
99100 raise_exception();
100101 }
102+ #endif
101103
102104 struct rst_info rst_info;
103105 memset (&rst_info, 0 , sizeof (rst_info));
@@ -239,7 +241,9 @@ static void raise_exception() {
239241
240242#else
241243
242- __asm__ __volatile__ (" syscall" ); // no effect?
244+ if (gdb_present ())
245+ // *((char*)0) = 0;
246+ __asm__ __volatile__ (" syscall" ); // triggers GDB when enabled
243247
244248 fake_rst_reason = FAKE_REASON_USER;
245249 ets_printf_P (PSTR (" \n User exception (panic/abort/assert)" ));
You can’t perform that action at this time.
0 commit comments