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

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.3.0-rc1
    • Qt Creator 4.2.1
    • Debugger
    • None
    • e76b5276d4f334839ec240e1c8adebedf33f20cb

    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

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