Break on Data Access at Fixed address, confusing user interface
-
I would like to set a breakpoint that fires when "myData" changes. This works fine, but qtcreater makes 2 breakpoints, and the properties window of the breakpoint confuses me.
I have this code:
main.cpp:#include "mainwindow.h" #include <QApplication> int myData = 0; int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; myData = 1; //break on this line please w.show(); return a.exec(); }I can place a breakpoint on the line myData = 1, and qt indeed breaks correctly:

I would like to set a data breakpoint, that reacts to the data being changed. After creating an expression evaluator, I was able to create the breakpoint:

This creates two breakpoints, one with the function "-", and one with the function "Data at myData". This breaks correctly directly after the instruction that alters myData:

The top breakpoint has the fields I expect: (Expression: myData):

The bottom breakpoint is empty:

My versions:
Qt creator 12.0.1
based on Qt 6.6.1
GNU gdb (GDB) 13.2
Arch linux, Xorg, LXDE:
$ uname -a
Linux cedric-work-laptop 6.6.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Jan 2024 16:20:41 +0000 x86_64 GNU/Linux -
C Christian Ehrlicher moved this topic from General and Desktop on