This is an automated email from the ASF dual-hosted git repository. masayuki pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 1815c2e1e1 tools/nuttx-gdbinit: restore the context at the end of each command 1815c2e1e1 is described below commit 1815c2e1e1ffb1d4df98a28602cfd8dc26000268 Author: chao an <anc...@xiaomi.com> AuthorDate: Thu Nov 24 22:46:03 2022 +0800 tools/nuttx-gdbinit: restore the context at the end of each command Signed-off-by: chao an <anc...@xiaomi.com> --- tools/nuttx-gdbinit | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/nuttx-gdbinit b/tools/nuttx-gdbinit index 9bb67c894c..5860b5dba1 100644 --- a/tools/nuttx-gdbinit +++ b/tools/nuttx-gdbinit @@ -415,6 +415,13 @@ define _switch_tcb_simx86 set $pc = $tcb.xcp.regs[5] end +define _restore_current_tcb + # TODO: SMP + set $tcb = g_readytorun->head + _switch_tcb $tcb + set $_current_tcb = 0x0 +end + define nxthread _examine_target _save_current_tcb @@ -432,6 +439,7 @@ define nxthread end end end + _restore_current_tcb end define nxthread_all_bt @@ -442,6 +450,7 @@ define nxthread_all_bt nxthread $i 1 set $i = $i + 1 end + _restore_current_tcb end define info_nxthreads @@ -452,13 +461,11 @@ define info_nxthreads nxthread $i 0 0 set $i = $i + 1 end + _restore_current_tcb end define nxcontinue printf "nxcontinue\n" - # TODO: SMP - set $tcb = g_readytorun->head - _switch_tcb $tcb - set $_current_tcb = 0x0 + _restore_current_tcb continue end