Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-17803

Debugger shows wrong address for pointer treated as array

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.2.1
    • Fix Version/s: Qt Creator 4.4.0
    • Component/s: Debugger
    • Labels:
      None
    • Environment:
      Using QTCreator 4.2.1 on Windows 10 with MinGW 5.3 as installed and configured by the online installer.
    • Commits:
      99ac955664efa1c99a25e8df5aff09f55abb301c

      Description

      Take a pointer and try to Change the Local Display Format to show it as an Array of 10 items. Instead of dereferencing the pointer and displaying 10 consecutive items at that memory address, the debugger tries to who you 10 items starting at the address of the pointer variable on the stack.

      This image shows examining a pointer on the stack:

      Note that the pointer holds the address 0xc912a0 and is located at 0x0029feac. Then I try do display as Array of 10 items and get:

      The base address of it is displaying is 0x0029feac and the first value it is displaying is the address 0xc912a0 displayed as a decimal 13177504.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTCREATORBUG-17803
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              hjk hjk
              Reporter:
              ascholerchemeketa Andrew Scholer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes