cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable / configure dynamic breakpoint ?

PSimo.4
Associate II

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

4 REPLIES 4
Pavel A.
Evangelist III

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?

Semer CHERNI
ST Employee

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.

0693W00000UnhwfQAB.png 

0693W00000UnhumQAB.png 

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.

I’m using default gdb and ST-LINK/V2 via usb.

I’m a begginner, so I didn’t hack anythink xD

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 ?