Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Expanding the ‘this’ Pointer in the Debug Locals Window
Forum Updated to NodeBB v4.3 + New Features

Expanding the ‘this’ Pointer in the Debug Locals Window

Scheduled Pinned Locked Moved Solved General and Desktop
gdb terminatedoptimized outexpanding this
4 Posts 2 Posters 512 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
    Corny
    wrote on last edited by aha_1980
    #1

    I’ve run into a situation using Qt Creator that I’m hopping that someone has seen and already solved because I don’t really even know where to start on figuring this one out. I’ve saw several posts on this forum that were similar but the suggested fixes didn’t seem to apply.

    I’m using Windows 7 Pro, 64-bit with Qt Creator v4.9.2 and applying the Desktop Qt 5.12.3 minGW 64-bit kit to run and debug.

    When running in debug and a break point is set, when the program halts execution at the break point, I can see the variables and their values that were declared in the current function displayed in a rather unusual way (explanation in next paragraph). When I attempt to expand the local this pointer, the following window pops up and after selecting “OK”, the debugger shuts down completely.

    Error.png
    This only occurs when I attempt to expand the this pointer, all other expandable variables expand without any problem.

    In addition, there is something else that I have never seen before. With the exception of the this pointer, the variables and their values that are displayed in the locals window, each appear to have multiple instances displayed with the duplicates having an @ symbol and their value <optimized out>.

    Example...
    file “filename”
    file@1 <optimized out>
    file@2 <optimized out>
    velocity 300
    velocity@1 <optimized out>
    velocity@2 <optimized out>

    I did not make any changes that I’m aware of to the system, the Qt setup or the Qt project build prior to this event occurring. It happened right after changing several large chunks of my code, none of which should have changed anything for Qt, the compiler or the debugger..

    If anybody has seen this or knows what I’ve screwed-up, I would highly appreciate it if someone can help me clear this up.

    JonBJ 1 Reply Last reply
    0
    • C Corny

      I’ve run into a situation using Qt Creator that I’m hopping that someone has seen and already solved because I don’t really even know where to start on figuring this one out. I’ve saw several posts on this forum that were similar but the suggested fixes didn’t seem to apply.

      I’m using Windows 7 Pro, 64-bit with Qt Creator v4.9.2 and applying the Desktop Qt 5.12.3 minGW 64-bit kit to run and debug.

      When running in debug and a break point is set, when the program halts execution at the break point, I can see the variables and their values that were declared in the current function displayed in a rather unusual way (explanation in next paragraph). When I attempt to expand the local this pointer, the following window pops up and after selecting “OK”, the debugger shuts down completely.

      Error.png
      This only occurs when I attempt to expand the this pointer, all other expandable variables expand without any problem.

      In addition, there is something else that I have never seen before. With the exception of the this pointer, the variables and their values that are displayed in the locals window, each appear to have multiple instances displayed with the duplicates having an @ symbol and their value <optimized out>.

      Example...
      file “filename”
      file@1 <optimized out>
      file@2 <optimized out>
      velocity 300
      velocity@1 <optimized out>
      velocity@2 <optimized out>

      I did not make any changes that I’m aware of to the system, the Qt setup or the Qt project build prior to this event occurring. It happened right after changing several large chunks of my code, none of which should have changed anything for Qt, the compiler or the debugger..

      If anybody has seen this or knows what I’ve screwed-up, I would highly appreciate it if someone can help me clear this up.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Corny
      I don't use Qt IDE, but ...

      1. Since you made your "big code changes". have you made everything clean, deleting intermediate files, clearing caches, etc, and done a 100% clean rebuild?

      2. Have you tried just running command-line gdb on it, outside of Qt Creator, and then examine this? Might prove it's gdb that's in the bad state?

      3. Have you created just a simple, brand new project and checked that still debugs OK? Want to make sure the problem is in the existing project and not in Qt/gdb itself.

      1 Reply Last reply
      1
      • C Offline
        C Offline
        Corny
        wrote on last edited by
        #3

        Thanks for the suggestions JonB, they are all good suggestions. I have indeed cleaned the program up and also re-ran qmake. I will try your other two suggestions and let you know the result.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Corny
          wrote on last edited by
          #4

          I eventually became overly frustrated and I just re-installed the whole Qt package. It appears to be working fine now. Thanks so much for your assistance.

          1 Reply Last reply
          3

          • Login

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