Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Break on Data Access at Fixed address, confusing user interface
Qt 6.11 is out! See what's new in the release blog

Break on Data Access at Fixed address, confusing user interface

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 353 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cedric-air
    wrote on last edited by
    #1

    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:
    4342119f-912a-4ee8-b9ff-ef3312b8039f-image.png

    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:
    42867bb0-7caa-4f8c-bd2f-d3b7a2232b08-image.png
    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:
    9f427168-e432-42f4-aa78-c53ce16900e4-image.png
    The top breakpoint has the fields I expect: (Expression: myData):
    74a3818e-0b0d-4cc4-9a4f-169e7cea642a-image.png
    The bottom breakpoint is empty:
    d52634a4-36a5-4d07-b4ba-fb4accb70249-image.png

    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

    1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved