break.n utilization

pdelprat
Posts: 10
Joined: Mon Sep 04, 2017 1:37 pm

break.n utilization

Postby pdelprat » Sat Jan 06, 2018 1:25 pm

Hello,

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)
Stepi in gdb doesn't increase PC !!! Why ?

Thanks,
Pascal

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: break.n utilization

Postby ESP_igrr » Sat Jan 06, 2018 2:02 pm

This was working some time ago, perhaps recent changes to OpenOCD have broken this behavior.

https://github.com/espressif/openocd-esp32/issues/2

Could you please prepare OpenOCD log file as described here: http://esp-idf.readthedocs.io/en/latest ... penocd-gdb and attach it to the issue ticket above?
Also please mention which OpenOCD version you are using. Thanks.

Who is online

Users browsing this forum: Google [Bot] and 386 guests