Print option in debugger

Leon Pollak leonp at plris.com
Wed Feb 28 18:56:48 GMT 2007


On Wednesday 28 February 2007, Andreas Pakulat wrote:
> > 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...:-))
> Does that mean there exist variables at a given line of code that are
> not shown in the variables window (regardless of their scope).
Yes, there are.
And, again, this is correct, because not all variables are always in the local 
RAM and therefore may be shown easily. Some of them may (point to)/reside in 
some HW registers/memories which 'can not' or 'forbidden to' be read simply 
each time when you want. For example, some HW units have the status register 
which indicates the interrupt status, the fact of the register reading itself 
acknowledges the interrupt which means that you lost it. Another HW units may 
have write-only areas, or areas which have only 16bit access... and so on.


> > 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?
> No, its not that difficult to implement, the problem is that if that
> variable shows up in the variables view and no proper value is displayed
> then a p <var> won't help. If the variable just doesn't show up in the
> variable view, then there's a problem with gdb. I'm just trying to find
> out what exactly you are seeing, maybe you can upload a screenshot that
> shows your problem to somewhere?
Although I do not understand exactly what do I miss, please, find attached 
snapshot1.png.


> > I should like to say that you (and kdevelop team?) are a bit closed on
> > the concept of the strict, only KDE development.
> I don't think so, QString was just an example. std::vector cannot be
> printed either. I'm not sure if std::string can. Basically any variable
> that uses struct or class cannot be printed, you can of course alwayes
> navigate through the members and if those are printable then they show
> up fine.
Hmmm. Obviously, I do not understand something. Please, find attached the 
snapshot2.png, where I made two print commands. This is what I am speaking 
about. Both VWEB and pEN are objects of their classes. I want to have the 
ability to print them by pointing and right-clicking  and not typing.


> > 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...
>
> You are free to write wishlist reports for any of these to get this for
> 4.0. The only thing that I think can't be done is a mixed source/asm
> view, because our editor doesn't allow that.
Well, OK. Just tell me please, where this the place to write this which list?

Best Regards.
-- 
Leon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snapshot1.png
Type: image/png
Size: 72579 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20070228/541fa8bf/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snapshot2.png
Type: image/png
Size: 82556 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20070228/541fa8bf/attachment-0001.png>


More information about the KDevelop mailing list