diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-12-08 18:08:27 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-12-09 12:24:43 -0700 |
commit | 150a10e8841f012645b77d1a6eb10d25dbf89b56 (patch) | |
tree | d0066f5651c3adf821ae44c4fd30ad1f221dfa73 /libcr/coroutine.c | |
parent | 1c305010f427ac40fbecb80175d4323020a2ea66 (diff) |
GDB fixes
Diffstat (limited to 'libcr/coroutine.c')
-rw-r--r-- | libcr/coroutine.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcr/coroutine.c b/libcr/coroutine.c index a947ae9..7392b6c 100644 --- a/libcr/coroutine.c +++ b/libcr/coroutine.c @@ -635,6 +635,12 @@ void coroutine_main(void) { assert(saved); assert(!cr_is_in_intrhandler()); coroutine_running = 0; +#if CONFIG_COROUTINE_GDB + /* Some pointless call to prevent cr_gdb_readjmp() from + * getting pruned out of the firmware image. */ + if (coroutine_table[0].state != CR_NONE) + cr_gdb_readjmp(&coroutine_table[0].env); +#endif while (coroutine_cnt) { cid_t next; while ( !((next = coroutine_ringbuf_pop())) ) { |