GDB does not load .gdbinit (Windows)

espdorian
Posts: 33
Joined: Sat Dec 26, 2020 10:57 am

GDB does not load .gdbinit (Windows)

Postby espdorian » Tue Dec 29, 2020 2:39 pm

I am trying the most basic GDB / OpenOCD functionality because I am unable to get the debugger working in VS Code.
Follow instructions at:

https://docs.espressif.com/projects/esp ... mand-line

Hoever due to a security feature GDB does not load gdbinit file:
To enable execution of this file add
add-auto-load-safe-path H:\projects\esp\temp\get-started\blink\.gdbinit
line to your configuration file "$HOME/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "$HOME/.gdbinit".
This applies to Linux, so I searched for a gdbinit and found one:
.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\share\gdb\gdbinit

But adding "add-auto-load-safe-path H:\projects\esp\temp\get-started\blink\.gdbinit" to this file did not solve the issue.

Any suggestion ?

ESP_bignacio
Posts: 214
Joined: Wed May 02, 2018 12:12 pm

Re: GDB does not load .gdbinit (Windows)

Postby ESP_bignacio » Wed Jan 06, 2021 6:32 am

What's wrong with setting the debugger in the extension?

Are you able to build and flash with the extension commands ? Did you got any error configuring the extension ?

More info about debugging in https://github.com/espressif/vscode-esp ... BUGGING.md

espdorian
Posts: 33
Joined: Sat Dec 26, 2020 10:57 am

Re: GDB does not load .gdbinit (Windows)

Postby espdorian » Sun Jan 10, 2021 7:17 am

Thanks for your reply.

The page you are referring, the first section "Use our ESP-IDF Debug Adapter" shows :
"debugPort: Port for ESP-IDF Debug Adapter. Default: 43474"
The ESP JTAG adapter I have, has a USB connection, so I assume this section is applicable to another ESP-IDF Debug adapter.

So Initially I tried setting the debugger in the extension, using the second example on the page you referred ( "Use Microsoft C/C++ extension to debug")

This resulted in timeout errors, so after this I deciced to try to check the basics via the command line
(as described here: https://docs.espressif.com/projects/esp ... mmand-line)
This gave the same errors as with the initial setup via the IDF extension, it looks like if OpenOCD and GDB do not communicate with each other. Enabling logging did not reveal any additional info.

Who is online

Users browsing this forum: No registered users and 50 guests