Page 1 of 1

GDB does not load .gdbinit (Windows)

Posted: Tue Dec 29, 2020 2:39 pm
by espdorian
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 ?

Re: GDB does not load .gdbinit (Windows)

Posted: Wed Jan 06, 2021 6:32 am
by ESP_bignacio
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

Re: GDB does not load .gdbinit (Windows)

Posted: Sun Jan 10, 2021 7:17 am
by espdorian
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.