-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
st-util: GDB breakpoints do not break at appropriate location #1011
Comments
Hi, |
On Tue, Aug 04, 2020 at 07:58:08PM -0700, simbazor wrote:
similar problem with version 1.6.1 ... Reverting to version 1.5.1 good
Please `git bisect` it
|
Same problem with:
Cannot test with lower versions of st-utils because not compatibles with STM32G031xx (or am I wrong? --> #856) |
I seem to have the same problem with an STM32F767. v1.5.1 shipped with Debian works fine, while my own v1.6.1 build doesn't (current master can't even flash, probably some other problem). I will try and bisect this, but I'm off with a bad start as v1.5.1 won't build because of some CMake problem in |
@cmdrf: Use the |
Cool, thanks! That successfully compiles. But I'm still seeing the issue there, while v1.5.1 from Debian still works in the exact same setup 😕 . Maybe I'm chasing a red herring here. I'm doing this on an ARM machine right now. Trying something else next. EDIT: I'm just stupid. Running |
Thx. I'll have a look at it soon. |
I fiddled around a bit and got 09ea99a to compile. This is indeed the first commit where the problem appeared. Since it is related to the STLINK version, I tried the I have a clone STLINKv2 (0483:3748) updated with an official firmware at some point. |
@cmdrf: Can you checkout the current |
For this I had to switch from my IDE to hand crank gdb, because my IDE always wants to flash before running and flashing does not work on
So my conclusion would be: The issue was silently fixed in |
Interesting. I need some time to dig into this. |
@Nightwalker-87 Changing TARGET_HALTED to STLINK_CORE_HALTED is break the code. I analyzed the code and see that the core_stat cannot be STLINK_CORE_HALTED value. I think this problem have been fixed by #1027. |
@heliochronix @cmdrf: Can you verify this with ba5c679 and 5c03678 ? |
On Sat, Oct 24, 2020 at 11:13:36AM -0700, Fabian wrote:
For this I had to switch from my IDE to hand crank gdb, because my IDE always wants to flash before running and flashing does not work on `develop`.
Please name (and shame) the IDE
|
I did name it, and in the meantime I found out how to disable this behavior. And I really don't want to crash the party, but my STM32H750 never stops at any breakpoints :). Yes, I did try it without the IDE. But flashing works so I'll resort to printf debugging for now. |
@cmdrf Need look at the |
Preamble: My previous comment in this issue was only based upon one comment email. Rereading through whole #1011 did not reveal a name of something that I can link to an IDE. This comment is for inviting @cmdrf to share expriences with IDEs and IDE tweaking. Regarding the
is my advice to explore documentation and build a working configuration. |
@cmdrf try replace |
Please don't recycle this topic for anything else than a potential additional fix. |
@Ant-ON Thanks for the suggestion! Just to clarify: do you mean to replace all occurences (six, including those where the logic is negated), or just specific ones? I tried different combinations, but all it does is breaking the ability to flash. Still no breakpointing. gdb did point to a breakpoint when I Ctrl-C'd once, but I cannot reproduce it. @Nightwalker-87 Shall we open a new issue specific to breakpoints on STM32H7? |
@cmdrf replace only in Yes, I think need create new issue. It is another bug. |
Description:
When attempting to break at a particular point in the code, it seems a GDB session will instead break at a completely different location. The location of the break is consistent, but it is not the correct location. When using OpenOCD as the debugging bridge, the break occurs in the correct location.
Commandline-Output:
Expected/description:
It is expected that the debug session breaks at the appropriate line in the appropriate file, which is at address 0x8001aa0. However, it does not break here, and instead it always seems to break at completely different locations.
It almost seems as if the addresses reported back are off in some way, because (for example) OpenOCD reports that it was last idling at address 0x08002462, which is where the system waits for an interrupt. However, with
st-util
, it always seems to think it is idling on amovs
instruction in the middle of a thread starting function.An example of equivalent expected output from OpenOCD is below:
The GDB script used for the OpenOCD session is as follows:
The text was updated successfully, but these errors were encountered: