I try to type continue first and reset the board, seems the application runs well. But what still bothered me a lot is that all breakpoints seem not working as expected, in other words, the breakpoints are all set correctly but the application won't stop. Maybe the root cause is the strange behavior mentioned above?
C:\gnuarmemb>arm-none-eabi-gdb
GNU gdb (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 8.1.0.20180315-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file "C:/Users/Administrator/Desktop/zephyr.elf"
Reading symbols from C:/Users/Administrator/Desktop/zephyr.elf...done.
(gdb) target remote localhost:2331
Remote debugging using localhost:2331
k_cpu_idle () at C:/Users/Administrator/zephyr/arch/arm/core\cpu_idle.S:135
135 bx lr
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
k_cpu_idle () at C:/Users/Administrator/zephyr/arch/arm/core\cpu_idle.S:135
135 bx lr
(gdb) c
Thanks in advance for any inspirations and suggestions.