Results 1 to 1 of 1

Thread: [SOLVED]Qt debugger doesn't work properly, an important bug?

  1. #1
    Join Date
    Nov 2010
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Maemo/MeeGo

    Default [SOLVED]Qt debugger doesn't work properly, an important bug?

    Hello,
    I am trying to see the first ten values of a particular memory space pointed by a pointer. I can do it by evaluating an expression on Locals and Expressions window. Simply, hover on an expression and right-click "Evaluate Expression". Identifier will be shown on the window split down. In order to monitor first ten values, put " @10 " at the end of the identifier. It works properly for the local pointers in my program.
    However, the problem arises when I use a library of which I have the source code. When I try to see the first ten values of an array passed to a method which I call from the library.dll, debugger shows some nonsense numbers
    Such that,


    Qt Code:
    1. ble *vector1;double *vector2;...
    2. double aa = m_MyModul->m_pMyAPI->My_GetDistance(vector1,vector2);
    To copy to clipboard, switch view to plain text mode 
    In the code above, the values of vector1 and vector2 are different from the ones below.
    The following method is in my API.
    Qt Code:
    1. double My_GetDistance(double* x_bins, double* y_bins)
    2. { return theFex->GetDist(x_bins, y_bins);
    3. }
    To copy to clipboard, switch view to plain text mode 

    In the code above, vector1 and x_bins must be the same. But debugger shows something completely different.
    Oddly enough, if I put this code into the library source code
    Qt Code:
    1. for(int i=0;i<9;i++)
    2. qDebug()<<x_bins[i];
    To copy to clipboard, switch view to plain text mode 

    I am getting the first ten values on Terminal and they seem to be what I would normally expect.
    The values are different from the ones in the Locals and Expressions window. More specifically, the values in the Locals and Expressions windows are not meaningful at all.
    I presume it's a problem related to gdb but I am not sure.
    Is there anyone who can give me any advice or who encountered such a problem before?

    Thanks
    Last edited by magpielover; 19th December 2011 at 11:50.

Similar Threads

  1. phonon for imx53 doesn't work properly
    By yinyin in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 2nd December 2011, 03:50
  2. Replies: 2
    Last Post: 2nd August 2011, 16:05
  3. Graphics scene doesn't repaint properly
    By blooglet in forum Qt Programming
    Replies: 5
    Last Post: 16th April 2011, 16:48
  4. QProgressBar "crash" - doesn't work properly
    By metRo_ in forum Qt Programming
    Replies: 6
    Last Post: 23rd October 2010, 14:56
  5. Delegate doesn't paint properly
    By woodtluk in forum Qt Programming
    Replies: 4
    Last Post: 11th August 2010, 12:43

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.