Skip to content

Commit 68a131e

Browse files
committed
tuning for gdb
1 parent 2a24b25 commit 68a131e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cores/esp8266/core_esp8266_postmortem.cpp

+5-1
Original file line numberDiff line numberDiff 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("\nUser exception (panic/abort/assert)"));

0 commit comments

Comments
 (0)