Re: [Qt-creator] Debugging dumper.py and qt-creator 1.3.1 and gdb 7.1

2010-05-22 Thread paulo
Hi,
forget about my last mail, I downloaded the binary package which 
includes the qt4.7 =D

I was using the git for so long that I had forgotten about it. =p

now everything is cool and most important the debugger is working 
correctly.

aaa the debugger... the most important tool in a IDE suit. And 
Dijkstra who said in a vary famous paper that if a programmer needs the 
debugger then he shouldn't even be programming in the first place, 
because it means that he does not know what he is doing...
I wonder how many people actually program with suspenders by actually 
checking the correctness of their code by formal means.

oh well thanks for your time hehe =D
cheers

paulo wrote:
 Hi, until a while ago I was using qt-creator from git.
 Recently (can't remember why) I had to reinstall it and since the new 
 version is based on qt4.7 I had to skip it and go for an older 
 qt-creator version. More specifically 1.3.1
 
 Unfortunately the dumper.py does not seem to be supported by this 
 version, right? (hopefully wrong)
 
 Which one is the latest version of qt-creator which is still based on 
 4.6.2? (with dumper.py support)
 
 Thank you.
 Regards,
 Paulo
 
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


[Qt-creator] debugger and qt-creator...

2010-05-22 Thread paulo
Hi (again me)

yap the debugger...
well I'm debugging some code, and my classes are not shown correctly.
I can inspect the variable at the place where it was declared, but when 
I try to do the same after passing it as an argument into a function I 
click on the plus sign and nothing...
If I add it to the watch exp, nothing again.
However if shows the members ok if I add them like obj_name.member_var 
to the watch window.

hummm...

qt-1.3.84 downloaded a few minutes ago, linux-x86, gdb 7.1

how about that?

cheers,
paulo
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-22 Thread Andre Poenitz
On Fri, May 21, 2010 at 11:05:11PM +0300, Aekold Helbrass wrote:
 I am using NetBeans (Java) for my everyday work, so I'll describe it
 as example:
 
 Let's assume our line of code looks like this:
 painter.drawText(getX(), getY(), getString());
 
 When you're pressing step into in NetBeans it highlights all step
 into possibities, four of them in example above, and highlights one of
 them as default one, so you can press step into once again to go into
 default one or you can click with your mouse on any other to step into
 it. Then, when you're stepped all your way up to the end of getX() for
 example you're returned to the same line, with one function marked as
 visited, and you can step into another one.

But that's debugging Java, not C++?

For a fair comparison you would have to compare NetBeans for C++ with Qt
Creator, and given that it uses gdb as backend I strongly doubt the 
functionality you describe exists there.

We are more or less restricted to what the debugging backend (gdb in
this case) provides, and gdb does not have such 'list all function calls
in this line' kind of capability.

When I think about it. We could try to use information from the code
model and temporary breakpoints to simulate this. I guess we will run
into interesting behaviour for inlined code, though. Maybe it's still
worth a shot.
 
 In QtCreator it steps in the first one to execute (getX() in our
 case), and when you're stepping over the internals of function up to
 the end - Qt Creator will not show you the original line again with
 possibility to step into next function but will act as step over it.

I know this is unfortunate, but again, there's no way to know in advance
whether a 'step over' will leave the current function or not, so there
is not much choice except to provide a separate command to specifically
step out of a function (Shift-F11).

 So it took me some time to understand that I should press step into

[Rather step out...]

 on the last lines of getX() to step into getY(), but I can't just skip
 them and step directly into drawText().

Yes, it would be seven keystrokes in this case.

Andre'
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Debugging dumper.py and qt-creator 1.3.1 and gdb 7.1

2010-05-22 Thread Andre Poenitz
On Sat, May 22, 2010 at 02:49:17PM +0900, paulo wrote:
 Hi, until a while ago I was using qt-creator from git.
 Recently (can't remember why) I had to reinstall it and since the new 
 version is based on qt4.7 I had to skip it and go for an older 
 qt-creator version. More specifically 1.3.1
 Unfortunately the dumper.py does not seem to be supported by this 
 version, right? (hopefully wrong)

1.3.1 was able to use some first version of the Python dumpers, but
they had to be explicitly loaded.

You could try to put

   python execfilr('/path/to/dumper.py')
   python execfilr('/path/to/gdbmacros.py')

into your .gdbinit and check whether it makes a difference.

If it doesn't, you can still use the Compiled dumpers. They have
been present since 1.2.0 IIRC.

Andre'

PS: Why not just build Qt 4.7 from git, too?
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] debugger and qt-creator...

2010-05-22 Thread Andre Poenitz
On Sat, May 22, 2010 at 05:25:59PM +0900, paulo wrote:
 Hi (again me)
 
 yap the debugger...
 well I'm debugging some code, and my classes are not shown correctly.
 I can inspect the variable at the place where it was declared, but when 
 I try to do the same after passing it as an argument into a function I 
 click on the plus sign and nothing...
 If I add it to the watch exp, nothing again.
 However if shows the members ok if I add them like obj_name.member_var 
 to the watch window.

Could you create some minimal example reproducing this behaviour?

Andre'
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-22 Thread Aekold Helbrass
On Sat, May 22, 2010 at 12:40 PM, Andre Poenitz
andre.poen...@mathematik.tu-chemnitz.de wrote:
 On Fri, May 21, 2010 at 11:05:11PM +0300, Aekold Helbrass wrote:
 I am using NetBeans (Java) for my everyday work, so I'll describe it
 as example:

 Let's assume our line of code looks like this:
 painter.drawText(getX(), getY(), getString());

 When you're pressing step into in NetBeans it highlights all step
 into possibities, four of them in example above, and highlights one of
 them as default one, so you can press step into once again to go into
 default one or you can click with your mouse on any other to step into
 it. Then, when you're stepped all your way up to the end of getX() for
 example you're returned to the same line, with one function marked as
 visited, and you can step into another one.

 But that's debugging Java, not C++?

 For a fair comparison you would have to compare NetBeans for C++ with Qt
 Creator, and given that it uses gdb as backend I strongly doubt the
 functionality you describe exists there.

 We are more or less restricted to what the debugging backend (gdb in
 this case) provides, and gdb does not have such 'list all function calls
 in this line' kind of capability.

 When I think about it. We could try to use information from the code
 model and temporary breakpoints to simulate this. I guess we will run
 into interesting behaviour for inlined code, though. Maybe it's still
 worth a shot.

Of course, I am not telling that Qt Creator is bad or something, I am
just new to C++, started learning it as a hobby after feeling the
power of Qt with Qt Jambi. And after I tried all easily available C++
IDEs (about 15 of them) I found Qt Creator absolute winner. I just
didn't got used to it's behaviour yet.

About java-style debugging behaviour - may be it will be better to
create an issue in gdb project?

 In QtCreator it steps in the first one to execute (getX() in our
 case), and when you're stepping over the internals of function up to
 the end - Qt Creator will not show you the original line again with
 possibility to step into next function but will act as step over it.

 I know this is unfortunate, but again, there's no way to know in advance
 whether a 'step over' will leave the current function or not, so there
 is not much choice except to provide a separate command to specifically
 step out of a function (Shift-F11).

 So it took me some time to understand that I should press step into

 [Rather step out...]

 on the last lines of getX() to step into getY(), but I can't just skip
 them and step directly into drawText().

 Yes, it would be seven keystrokes in this case.

 Andre'
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] how to attach sources for debugging?

2010-05-22 Thread Coda Highland
 About java-style debugging behaviour - may be it will be better to
 create an issue in gdb project?

Probably, but I have my doubts you'll see much action on it; there are
a lot bigger fish to fry.

/s/ Adam
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] debugger and qt-creator...

2010-05-22 Thread paulo
Hi,
I tried the following code and I could verify the following symptoms:
- in the main routine you can access the a.i in the locals window, but 
not in f(A).
- However if I add a a to the watchers window then I can dereference 
the struct and access the *a.i

#include iostream


struct A {
A(const int i) :i(i) {}
int i;
};


void f(A a) {
std::cout  a.i;
}

int main(int argc, char *argv[]) {
A a(1);
f(a);
return 0;
}


qtc binary 1.3.84 rev 91cd56e0c6

cheers
paulo

Andre Poenitz wrote:
 On Sat, May 22, 2010 at 05:25:59PM +0900, paulo wrote:
 Hi (again me)

 yap the debugger...
 well I'm debugging some code, and my classes are not shown correctly.
 I can inspect the variable at the place where it was declared, but when 
 I try to do the same after passing it as an argument into a function I 
 click on the plus sign and nothing...
 If I add it to the watch exp, nothing again.
 However if shows the members ok if I add them like obj_name.member_var 
 to the watch window.
 
 Could you create some minimal example reproducing this behaviour?
 
 Andre'
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator
 
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


[Qt-creator] Adding directory path for symbol parsing in a generic project

2010-05-22 Thread Tomás Ortí
Hi.
I'm creating a generic project through the option Import of Makefile-based
Project.
It is recognizing the symbols under my local includes and also those in
/usr/include, but not the ones under /usr/include/SDL.
Is there a way to add a directory path to recognize symbols on it, in a
generic project?

Thanks in advance,
Tomas.
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator