[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 113834] New: Using Qt in Kdevelop the Debugger is virtually useless
From:       kdevelop-bugs-admin () barney ! cs ! uni-potsdam ! de
Date:       2005-10-04 13:31:59
Message-ID: 20051004153155.113834.jdhenning () gmx ! de
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=113834         
           Summary: Using Qt in Kdevelop the Debugger is virtually useless
           Product: kdevelop
           Version: unspecified
          Platform: SuSE RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-bugs kdevelop org
        ReportedBy: jdhenning gmx de


Version:           3.4  (using KDE KDE 3.4.0)
Installed from:    SuSE RPMs
OS:                Linux

I'm using Suse Linux 9.3 and KDevelop 3.4.0 "level b"

Actually I'm writing a program using linked lists, so I desperately need the debugger \
in order to keep track of what is happening.

The problem is, that out of unknown reasons, seemingly the optimisation flag for the \
compiler is set. First there is no rational reason why this is done and additionally \
I have found no place where to change this setting.

The consequence is that, when debugging, variables are not known. They are either not \
displayed under the local variables or it says "optimised out". When loading the \
variable-name into the global area, the display says "No symbol xxx in current \
context".

Additionally the debugger jumps up and down in the program, sometimes changing the \
value of variables that should not be affected at all and giving no chance to see, \
whether what the program does has anything to do with what I programed.

In some ocasions I had the impression that even the result of a computation changed \
when either using one-line-loops instead of   expression 
    {
    lines of code
    };
But as I said, this is an impression and I was not able to nail it down.

In consequence it is virtually impossible to debug programs under Kdevelop using \
Qt-User-Interfaces.

Since the installation of a new project with user interface under KDevelop is a pain, \
I built the ui-files under original Qt, copy them to the KDevelop-project and import \
them there. This might have an influence on the problem but anyhaow it should not.

If there is a work-around please let me know asap.

  Cheers
  Jürgen D. Henning

Following the content of the different files:

form1.ui.h
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/
#include <qlcdnumber.h>

void Form1::calculate_it()
  {
  int I, J, saveI;

  J = 20;
  I = 10;
  saveI = I;
  I = J;
  J = saveI;

  Number1->display(I);
  Number2->display(J);

  }


faul.pro
TEMPLATE	= app
LANGUAGE	= C++

CONFIG	+= qt warn_on release

SOURCES	+= main.cpp

FORMS	= form1.ui

unix {
  UI_DIR = .ui
  MOC_DIR = .moc
  OBJECTS_DIR = .obj
}

main.cpp

#include <qapplication.h>
#include "form1.h"

int main( int argc, char ** argv )
{
    QApplication a( argc, argv );
    Form1 w;
    w.show();
    a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
    return a.exec();
}


form1.ui
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Form1</class>
<widget class="QDialog">
    <property name="name">
        <cstring>Form1</cstring>
    </property>
    <property name="geometry">
        <rect>
            <x>0</x>
            <y>0</y>
            <width>281</width>
            <height>119</height>
        </rect>
    </property>
    <property name="caption">
        <string>Form1</string>
    </property>
    <widget class="QPushButton">
        <property name="name">
            <cstring>pushButton1</cstring>
        </property>
        <property name="geometry">
            <rect>
                <x>20</x>
                <y>60</y>
                <width>101</width>
                <height>31</height>
            </rect>
        </property>
        <property name="text">
            <string>&amp;Calculate</string>
        </property>
    </widget>
    <widget class="QPushButton">
        <property name="name">
            <cstring>pushButton2</cstring>
        </property>
        <property name="geometry">
            <rect>
                <x>140</x>
                <y>60</y>
                <width>101</width>
                <height>31</height>
            </rect>
        </property>
        <property name="text">
            <string>Exi&amp;t</string>
        </property>
    </widget>
    <widget class="QLCDNumber">
        <property name="name">
            <cstring>Number1</cstring>
        </property>
        <property name="geometry">
            <rect>
                <x>20</x>
                <y>10</y>
                <width>91</width>
                <height>31</height>
            </rect>
        </property>
    </widget>
    <widget class="QLCDNumber">
        <property name="name">
            <cstring>Number2</cstring>
        </property>
        <property name="geometry">
            <rect>
                <x>140</x>
                <y>10</y>
                <width>81</width>
                <height>31</height>
            </rect>
        </property>
    </widget>
</widget>
<connections>
    <connection>
        <sender>pushButton2</sender>
        <signal>clicked()</signal>
        <receiver>Form1</receiver>
        <slot>close()</slot>
    </connection>
    <connection>
        <sender>pushButton1</sender>
        <signal>clicked()</signal>
        <receiver>Form1</receiver>
        <slot>calculate_it()</slot>
    </connection>
</connections>
<includes>
    <include location="local" impldecl="in implementation">form1.ui.h</include>
</includes>
<slots>
    <slot>calculate_it()</slot>
</slots>
<pixmapinproject/>
<layoutdefaults spacing="6" margin="11"/>
</UI>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic