Print option in debugger

Leon Pollak leonp at plris.com
Wed Feb 28 11:29:40 GMT 2007


On Wednesday 28 February 2007, Andreas Pakulat wrote:
> > If yes, then how some variable appears there?
> All variables that gdb reports are shown there, or what do you mean?
I am not big in gdb interfaces, just a user. And I do not see in this window a 
lot of variables mentioned in the code. Actually, only local variables are 
displayed automatically and this is correct and good!
But there are much more...:-))


> > where X is the variable under the cursor. And gdb knows very well which
> > type is X. And it needs not be only the built-in C, as you mentioned. It
> > knows all the types, classes, enums, defines, etc. defined in the
> > executable.
> Yes it knows the type, but knowing a given type doesn't tell it how the
> type has to be printed. For example for QString you have to fetch a
> specific internal member variable to get to the actual value and also
> process that value a bit.
Yes, there are many possible complicated cases where just "print" will not 
work, I understand. And I do not suggest to use "print" INSTEAD of "watch" 
or "evaluate". Just together. And it seems to be not very difficult to 
implement, no?

I should like to say that you (and kdevelop team?) are a bit closed on the 
concept of the strict, only KDE development. But kdevelop is a great tool to 
be used in many other cases of SW development. I, for example, use it to 
develop embedded data acquisition system with PowerPC processor under Linux. 
Application utilizes Real Time OS and is written in C++ and is debugged by 
using gdb remote protocol. And I recommend kdevelop to many of other embedded 
developers, as it is fast, simple, comfortable, etc. in the field of code 
writing and processing. But debugger interface, if compared to the rest of 
the IDE is less rich (no suitable registers view, no mixed (source/asm) view, 
problems with console and MI interface to gdb, etc.). I am not blaming 
anybody in any way, just telling my own feelings...

Best Regards
-- 
Leon




More information about the KDevelop mailing list