Perhaps it's a misunderstanding, but the behavior of break.n is strange for me.
Here is a extract of my little code :
Code: Select all
void tryBreak()
{
asm("break.n 8");
}
void app_main()
{
tryBreak();
}
Here is gdb output :
Code: Select all
Temporary breakpoint 1, app_main ()
at C:/msys32/home/pasca/esp/tempC/main/hello_world_main.c:162
162 {
2: x/i $pc
=> 0x400d23c8 <app_main>: entry a1, 32
1: $windowbase = 14
(gdb) si
Target halted. PRO_CPU: PC=0x400D23CB (active) APP_CPU: PC=0x400D1832
163 tryBreak();
2: x/i $pc
=> 0x400d23cb <app_main+3>: call8 0x400e32d8 <tryBreak>
1: $windowbase = 0
(gdb) si
Target halted. PRO_CPU: PC=0x400E32D8 (active) APP_CPU: PC=0x400D1832
tryBreak () at C:/msys32/home/pasca/esp/tempC/main/hello_world_main.c:136
136 {
2: x/i $pc
=> 0x400e32d8 <tryBreak>: entry a1, 32
1: $windowbase = 0
(gdb) si
Target halted. PRO_CPU: PC=0x400E32DB (active) APP_CPU: PC=0x400D1832
137 asm("break.n 8");
2: x/i $pc
=> 0x400e32db <tryBreak+3>: break.n 8
1: $windowbase = 2
(gdb) si
esp32: xtensa_step: Stepping doesn't seem to change PC!
Target halted. PRO_CPU: PC=0x400E32DB (active) APP_CPU: PC=0x400D1832
137 asm("break.n 8");
2: x/i $pc
=> 0x400e32db <tryBreak+3>: break.n 8
1: $windowbase = 2
(gdb) si
esp32: xtensa_step: Stepping doesn't seem to change PC!
Target halted. PRO_CPU: PC=0x400E32DB (active) APP_CPU: PC=0x400D1832
137 asm("break.n 8");
2: x/i $pc
=> 0x400e32db <tryBreak+3>: break.n 8
1: $windowbase = 2
(gdb) si
esp32: xtensa_step: Stepping doesn't seem to change PC!
Target halted. PRO_CPU: PC=0x400E32DB (active) APP_CPU: PC=0x400D1832
137 asm("break.n 8");
2: x/i $pc
=> 0x400e32db <tryBreak+3>: break.n 8
1: $windowbase = 2
(gdb)
Thanks,
Pascal