Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenOCD V11 IDF V4.4 Eclipse Debugger steps into when using stepover command. (OCD-478) #210

Closed
MPC-BlackBox opened this issue Feb 2, 2022 · 4 comments

Comments

@MPC-BlackBox
Copy link

Development Kit

Customer Product

Module or chip used

ESP32-wroom-32E

Debug Adapter

ESP-PROG

OpenOCD version

v0.11.0-esp32-20211220

Operating System

ubuntu

Using an IDE ?

Eclipse

OpenOCD command line

openocd -s ${openocd_path}/share/openocd/scripts -c 'set ESP32_FLASH_VOLTAGE 3.3' -f interface/ftdi/esp32_devkitj_v1.cfg -f target/esp32.cfg

JTAG Clock Speed

default

ESP-IDF version

V4.4

Problem Description

When stepping over code the debugger will step into instead of over the code

The attached screen recording shows the debugger steps into SPI_lus_initialise()

When I resume the program to a breakpoint then step the debugger steps over some routines but then steps into nvs_close(nvs_handle)

I also get the error
Error: FreeRTOS uxTaskNumber seems to be corrupted!

Debug Logs

Info : esp32.cpu0: Target halted, PC=0x400D7E80, debug_reason=00000001
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x40168F66, debug_reason=00000000
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Info : esp32.cpu0: Target halted, PC=0x400D7FDD, debug_reason=00000001
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400D45F5, debug_reason=00000000
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Error: FreeRTOS uxTaskNumber seems to be corrupted!
Info : esp32.cpu0: Target halted, PC=0x400D7FFF, debug_reason=00000001
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x4016C04C, debug_reason=00000000

Expected behavior

Debugger should reliably step over routines

OpenOCDV11.mp4

.

Screenshots

No response

@github-actions github-actions bot changed the title OpenOCD V11 IDF V4.4 Eclipse Debugger steps into when using stepover command. OpenOCD V11 IDF V4.4 Eclipse Debugger steps into when using stepover command. (OCD-478) Feb 2, 2022
@gerekon
Copy link
Collaborator

gerekon commented Feb 2, 2022

Hi @MPC-BlackBox

Could you collect verbose OpenOCD and GDB logs and attach them here? You need to add -d3 -l oocd.log option to OpenOCD command line and add GDB startup command set remotelogfile gdb_log.txt as described here

@MPC-BlackBox
Copy link
Author

Hi @gerekon,

I tried the -l command in OpenOCD but just got a timeout. OpenOCD does not seem to like the -l command.

I dropped the -l command and just copied the verbose output from the console.

This morning I am not getting the :
Error: FreeRTOS uxTaskNumber seems to be corrupted!

I have looked through the log files but I no idea what I am looking at.

Cheers
oocd.txt
gdb_log.txt

.

@MPC-BlackBox
Copy link
Author

MPC-BlackBox commented Feb 3, 2022

I tried using the command n in the debugger console which I believe is the GDB command for step over. But the GDB still step into code.

I also tried to build and use the latest master branch v0.11.0-esp32-20211220-23-g461a4c2b (2022-02-03-09:57) but still had the same problem.

Reinstalled early version of OpenOCD right back to openocd-esp32-linux64-0.10.0-esp32-20200526 but the problam still occured.

Decided to reinstall early version of GDB and version esp-2021r1-8.4.0 seems to work okay. I can step over code properly.

The issue seems to be with the latest version of GDB esp-2021r2-8.4.0

@gerekon
Copy link
Collaborator

gerekon commented Feb 8, 2022

Seems to be the same issue as espressif/esp-idf#8065 related to fixes in GDB from esp-2021r2-8.4.0 toolcahin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants