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. Data Breakpoints being ignored?
Forum Updated to NodeBB v4.3 + New Features

Data Breakpoints being ignored?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 4 Posters 174 Views 2 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.
  • A Offline
    A Offline
    A123
    wrote last edited by
    #1

    Hi, I am trying to figure out what code is changing a particular variable in debugging. So in the Locals Window in Debugging mode I rightclick the variable and set a Data Breakpoint at either Fixed Address or Address given by Expression and put in the variable name. And the new breakpoint appears as a gray dot at the bottom. But when I click the button to continue the other breakpoints will be cycled through but the data breakpoint will just sit there doing nothing apparently.

    I am in Debug Build and the address of the variable remains the same as far as I see. And the variable value is clearly changing. Isn't there supposed to be some stoppage and indication that a data breakpoint has been tripped?

    I'm using Qt Creator version 14.0.2 and running through Linux Mint.

    JonBJ 1 Reply Last reply
    0
    • A A123

      Hi, I am trying to figure out what code is changing a particular variable in debugging. So in the Locals Window in Debugging mode I rightclick the variable and set a Data Breakpoint at either Fixed Address or Address given by Expression and put in the variable name. And the new breakpoint appears as a gray dot at the bottom. But when I click the button to continue the other breakpoints will be cycled through but the data breakpoint will just sit there doing nothing apparently.

      I am in Debug Build and the address of the variable remains the same as far as I see. And the variable value is clearly changing. Isn't there supposed to be some stoppage and indication that a data breakpoint has been tripped?

      I'm using Qt Creator version 14.0.2 and running through Linux Mint.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote last edited by
      #2

      @A123
      Your experience may vary from mine. But I have never found "data breakpoints" work reliably in the various debuggers I have used over the years! At best they may work better on a fixed memory address given as a constant number. For all I know doing it via "Expression" might mean you have to enter &VariableName rather than VariableName?

      I imagine this is not done by Creator but by the underlying debugger? Have you tried placing the data breakpoint directly in gdb and running quite outside of Creator just to see whether this works?

      S 1 Reply Last reply
      0
      • JonBJ JonB

        @A123
        Your experience may vary from mine. But I have never found "data breakpoints" work reliably in the various debuggers I have used over the years! At best they may work better on a fixed memory address given as a constant number. For all I know doing it via "Expression" might mean you have to enter &VariableName rather than VariableName?

        I imagine this is not done by Creator but by the underlying debugger? Have you tried placing the data breakpoint directly in gdb and running quite outside of Creator just to see whether this works?

        S Offline
        S Offline
        SimonSchroeder
        wrote last edited by
        #3

        @JonB said in Data Breakpoints being ignored?:

        But I have never found "data breakpoints" work reliably in the various debuggers I have used over the years!

        They work really well with Visual Studio (at least the few times I have used them). At least in Visual Studio I don't just have to mention the address of the variable, but also its size in bytes. Maybe there is something similar for the debugger you are using. Depending on little endian/big endian you might not catch any change of a variable if you just observe a single byte at the specified address.

        SGaistS 1 Reply Last reply
        0
        • S SimonSchroeder

          @JonB said in Data Breakpoints being ignored?:

          But I have never found "data breakpoints" work reliably in the various debuggers I have used over the years!

          They work really well with Visual Studio (at least the few times I have used them). At least in Visual Studio I don't just have to mention the address of the variable, but also its size in bytes. Maybe there is something similar for the debugger you are using. Depending on little endian/big endian you might not catch any change of a variable if you just observe a single byte at the specified address.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote last edited by
          #4

          @SimonSchroeder If memory serves well, one thing that can play in this this is that the Visual Studio debugger is not exactly the same as cdb which might explain the difference in experience.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply
          0
          • SGaistS SGaist

            @SimonSchroeder If memory serves well, one thing that can play in this this is that the Visual Studio debugger is not exactly the same as cdb which might explain the difference in experience.

            S Offline
            S Offline
            SimonSchroeder
            wrote last edited by
            #5

            @SGaist No, its not. Also, the OP is asking for Linux anyway. I just assumed that this might be something that other debuggers do as well.

            1 Reply Last reply
            0

            • Login

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