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

GDB debugger wrapper does not correctly display pointers as arrays.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • Qt Creator 4.3.0
    • Qt Creator 4.3.0-rc1
    • Debugger
    • None
    • Using QTCreator 4.3.0rc1 on Windows 10 with MinGW 5.3.
    • 99ac955664efa1c99a25e8df5aff09f55abb301c

    Description

      This is an unfixed bug from 5.2 - that report was never evaluated:

      https://bugreports.qt.io/browse/QTCREATORBUG-17803

      QTCreator's wrapper around GDB does not dereference pointers when it is told to view the pointer with "Array of size _______". Instead it shows memory starting at the address of the pointer variable itself.

      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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              hjk hjk
              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