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

data reported in Qtcreator pretty printer is wrong in some case for static members

    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.3.0-rc1
    • Component/s: Debugger
    • Labels:
      None

      Description

      considering the following code:

      main () {
        std::locale loc1;     // initialized to locale::classic()
        std::locale loc2 = std::locale ("en_US.UTF8");
      }
      

      (compiled under gcc 4.8, 5.1, 5.2 and 5.3)

      when expanding the loc1 and loc2 varaible, we should find a static member _S_categories
      in loc1 the member is correctly displayed. In loc2 it is not displayed
      When querying gdb using:

      p loc1 
      p loc2
      

      the result is as expected (both pointer equal to same value)

      <83p loc1
      >&"p loc1\n"
      >~"$1 = {static none = 0"
      >~", static ctype = 1"
      >~", static numeric = 2"
      >~", static collate = 4"
      >~", static time = 8"
      >~", static monetary = 16"
      >~", static messages = 32"
      >~", static all = 63"
      >~", _M_impl = 0xb74a7ab4 <(anonymous namespace)::c_locale_impl>, static _S_classic = 0xb74a7ab4 <(anonymous namespace)::c_locale_impl>, static _S_global = 0xb74a7ab4 <(anonymous namespace)::c_locale_impl>, static _S_categories = 0xb74a0740 <__gnu_cxx::category_names>, static _S_once = 2"
      >~", static _S_twinned_facets = 0xb74a11e0 <std::locale::_S_twinned_facets>}"
      >83^done
      
      
      <84p loc2
      >&"p loc2\n"
      >~"$2 = {static none = 0"
      >~", static ctype = 1"
      >~", static numeric = 2"
      >~", static collate = 4"
      >~", static time = 8"
      >~", static monetary = 16"
      >~", static messages = 32"
      >~", static all = 63"
      >~", _M_impl = 0x80c0cf0, static _S_classic = 0xb74a7ab4 <(anonymous namespace)::c_locale_impl>, static _S_global = 0xb74a7ab4 <(anonymous namespace)::c_locale_impl>, static _S_categories = 0xb74a0740 <__gnu_cxx::category_names>, static _S_once = 2"
      >~", static _S_twinned_facets = 0xb74a11e0 <std::locale::_S_twinned_facets>}"
      >84^done
      

      I attach the screen shot to show the issue.

        Attachments

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

          Activity

            People

            Assignee:
            hjk hjk
            Reporter:
            toolinfo stephane petithomme
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes