-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
GDB debugging commands do the wrong thing (IDFGH-6406) #8065
Comments
I have had the same problem. I found that this is caused by esp-2021r2-8.4.0 If you reinstall esp-idf version 4.3.1 and install the tools, this will install the old GBD into your ~/.espressif directory In eclipse set the GDB client to this old GDB version. |
@szekelyisz @MPC-BlackBox Thank you for the issue report. We were able to confirm the issue. It is a regression introduced while fixing another bug (interrupted backtraces in "noreturn" functions, such as "abort".) |
Sorry, closed it accidentally instead of its duplicate in OpenOCD repo. |
Closes #8065 Closes #8342 Closes espressif/openocd-esp32#210
Closes #8065 Closes #8342 Closes espressif/openocd-esp32#210
I'm still experiencing this problem with toolchain version 2022r1. |
@igrr Can you reopen this issue please? |
@szekelyisz , could you show the version? Please run |
|
@szekelyisz , this version must contain the fix... Could you please describe steps to reproduce? |
Thanks for dealing with this @Lapshin . Please see the original report for detailed instructions to reproduce. |
@szekelyisz , sorry for the long delay! The issue was fixed on GDB side but did not fix on OpenOCD side. Today it should be released. The tag for it is already created but artifacts have not been uploaded yet. After the release, IDF will be updated with the newest OpenOCD in a few days. |
Thank you @Lapshin. I'll wait for the release and test it. |
@szekelyisz does it work for your case now? |
Sorry for the long delay @Lapshin. It seems to work fine. Thanks for your help. |
Environment
git describe --tags
to find it): v4.4-beta1-177-ge104dd7f27xtensa-esp32-elf-gcc --version
to find it): xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2) 8.4.0Problem Description
Stepping commands seem to be messed up. After a breakpoint is hit, "Step over" does "Step into" for example. This is not an Eclipse plugin problem as it also happens if I use the debugger console to give direct commands to gdb.
Expected Behavior
Stepping functions to work as expected.
Actual Behavior
"Step over" does "Step into" and other weird stuff like seemingly corrupting the stack.
Steps to reproduce
protocols/http_server/simple
example.Code to reproduce this issue
Here
Debug Logs
We hit the breakpoint. Let's take a look at our backtrace:
Seems fair. Let's do a "Step over". We expect to go to line 157 but we end up somewhere else:
That is an equivalent of a "Step into" operation. Let's see where we are exactly:
We seem to have lost
hello_get_handler
's stack frame. But let's keep going:At this point we're in ROM code. The last executed call was
strlen
. But alsohello_get_handler
is back on the stack, and nowhttpd_req_get_hdr_value_len
is gone:If you just let it run, the example will work as expected, so my guess is that it's not actually corrupting the stack, just hides the 2nd frame from the top for some reason.
Other items if possible
The text was updated successfully, but these errors were encountered: