2022-10-07 07:01 AM
Hey hi Community !
I’m here because I didn’t found informations onto «fonction breakpoint» «event breakpoint» and «watchpoint» :
I work with STM32G071, write C and use GDB.
I want to configure a conditional breakpoint, that break when a variable is equal to a specific value. Is that possible ?
I tried with a Watchpoint, but it doesn’t work well.
Can you help me pls?
Thanks a lot !
Simon
2022-10-08 02:41 PM
Is your gdb and target software provided by ST (such as ST-LINK server or OpenOCD provided with CubeIDE, or J-LINK) or something generic?
2022-10-10 02:28 AM
Hello @PSimo.4
First let me thank you for posting.
In fact, such feature is implemented in STM32CubeIDE.
In the debugging view go to the Breakpoint view and right click on the breakpoint where you want to add a condition.
Open the Breakpoints Properties menu and add the stopping condition.
Kind regards,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-10-10 11:51 PM
I’m using default gdb and ST-LINK/V2 via usb.
I’m a begginner, so I didn’t hack anythink xD
2022-10-11 12:01 AM
Thx a lot !
As Condition may I write « var == 5 » (if var is a correctly declared variable ?)
I saw Watchpoint with a similar interface, (with condition)
Is Watchpoint the same thing that a conditionnal breakpoint, but didn’t attached to a line ?