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

Add a simple example for custom debugging helpers

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • None
    • Qt Creator 2.3.0-beta
    • Documentation
    • None

    Description

      The example found here is a bit complicated and incomplete.

      I'd like to have an example for a simple class, for which I want to print a specific member.

      For example:

      class MyType
      {
      public:
        char value[50];
      };
      
      int main()
      {
        MyType obj;
        strcpy(obj.value, "value");
        return 0;
      }
      

      How do I make the debugger print 'value' for MyType?

      Another thing that confused me is that the doc says the qdump function should be inserted in gdbinit. For me, it didn't work. I needed to put it in an external file, and in gdbinit enter 'python execfile("/path/myfile.py")'. That's not clear enough (or maybe I did something wrong?)

      Attachments

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

        Activity

          People

            hjk hjk
            orgads Orgad Shaneh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes