Results 1 to 4 of 4

Thread: QTCreator Mac - Unable to debug properly?

  1. #1

    Default QTCreator Mac - Unable to debug properly?

    Hi all,

    A few weeks ago I bought a MacBook i5 (10.6.4) and I imported all my
    projects using GIT (before I was working on Ubuntu). I installed
    Qt Creator for Mac:

    Qt Creator 2.0.0
    Based on Qt 4.7.0 (64 bit)

    Built on Jun 18 2010 at 03:44:58

    From revision 1c0f52a091

    Everything seems to be fine except the debugging. Although
    Debugging Helper is on, this simple code:

    #include <vector>
    #include <iostream>

    int main(void)
    {
    std :: vector < int > jp;
    for (size_t i = 0; i < 10; i++)
    jp.push_back(i);

    std :: cout << "jp: ";
    for (size_t i = 0; i < jp.size(); i++)
    std :: cout << jp[i] << " ";
    std :: cout << std :: endl;

    return 0;
    }

    is not debugged properly. For example, setting a
    breakpoint at the line "std :: cout << "jp: ";" works
    but QTCreator is unable to properly display the contents
    of the vector "jp". Moreover, after a while a pop up
    is shown saying:

    The gdb process has not responded to a command within 20 seconds. This could mean it is stuck in an endless loop or taking longer than expected to perform the operation.
    You can choose between waiting longer or abort debugging.

    I thought it might be related to the compiler version:

    GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21 10:53:12 UTC 2010)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "x86_64-apple-darwin".

    So I download and compile the last version of the gdb:

    GNU gdb (GDB) 7.2
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-apple-darwin10".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.

    I also set the permissions using:

    codesign -s gdb-cert /Users/jpc/usr/bin/gdb
    codesign -s gdb-cert /Users/jpc/usr/bin/gdb

    But using this version, QTCreator complains saying:

    The inferior stopped because it received a signal from the Operating System.

    Signal name :
    SIGSEGV
    Signal meaning :
    Segmentation fault

    Now I don't really know what to try next...could you help me out
    guys?

    Thanks in advance.

  2. #2

    Default Re: QTCreator Mac - Unable to debug properly?

    * Update * Today I downloaded and installed QT Creator 2.1 beta from
    http://qt.nokia.com/developer/qt-qtc...lease#download

    Now when debugging the gdb (6.3) doesn't crash but I am still unable
    to see the content of STL containers (see example in previous post).
    Debug Helper is re-compiled for this version and activated. Any clue?


    Thanks

  3. #3

    Default Re: QTCreator Mac - Unable to debug properly?

    Ok folks, I figured it all out. It works know. I think this had to do with the support x86 & x86_64
    rather than to the compiler version. What I did is:

    1) Remove QT & QT Creator:
    sudo /Developer/Tools/uninstall-qt.py
    2) Remove Xtools (Developer tools)
    sudo /Developer/Library/uninstall-devtools --mode=all
    3) Install Xtools (supporting apps for 10.4)
    4) Install Qt 4.7
    5) Install Qt Creator 2.0.1beta

    I run the build for Debugging Helper in Preferences, and the
    same example works as charm

    I hope this helps someone.

  4. #4

    Default Re: QTCreator Mac - Unable to debug properly?

    I am experiencing a new problem with QtCreator. I am unable to
    set the content of STL containers when debugging if these are
    define using typdef. For example, With something like:

    std::vector<int> myVector,

    I am able to see its content with no problems. However, with:

    typdef std::vector<int> tVector;
    tVector myVector;

    It doesn't work. It's not able to show the content. It's like it
    wouldn't have the debugging helper on.

    This wouldn't be a big issue, but all my code has typedef.
    I tried with the last official version and with the nightly build,
    but the problem persists.

    Do you know if this is a known issue? does this catalogs as
    a bug?

    Thanks.

Similar Threads

  1. MYSQL plugin seems to be built properly, but not loaded in QtCreator [Windows]
    By GabrielGray in forum Installation and Deployment
    Replies: 1
    Last Post: 29th June 2010, 19:38
  2. How do i debug in QtCreator?
    By payal in forum Qt Tools
    Replies: 6
    Last Post: 25th February 2010, 10:03
  3. Unable to properly implement a QRubberBand
    By jamadagni in forum Qt Programming
    Replies: 1
    Last Post: 8th April 2009, 12:39
  4. unable to save QCStrings properly in a buffer
    By nass in forum Qt Programming
    Replies: 13
    Last Post: 15th November 2006, 20:49
  5. Unable to execute in Debug Mode
    By Kapil in forum Installation and Deployment
    Replies: 38
    Last Post: 5th April 2006, 07:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.