Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Are there any plans supporting Vector/Array/Map::operator[] during debug?
Are there any plans supporting Vector/Array/Map::operator[] during debug? [message #21190] Fri, 08 May 2009 12:43 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

A understand of course that it is very untrivial and must be very hard to code, but viewing something like myVector[i] would be very handy.
Re: Are there any plans supporting Vector/Array/Map::operator[] during debug? [message #21192 is a reply to message #21190] Fri, 08 May 2009 14:09 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Mindtraveller wrote on Fri, 08 May 2009 06:43

A understand of course that it is very untrivial and must be very hard to code, but viewing something like myVector[i] would be very handy.

Yes, I miss that too
Re: Are there any plans supporting Vector/Array/Map::operator[] during debug? [message #21206 is a reply to message #21192] Sat, 09 May 2009 17:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, maybe we could use dirty trick...

Mirek
Re: Are there any plans supporting Vector/Array/Map::operator[] during debug? [message #21213 is a reply to message #21206] Sat, 09 May 2009 22:09 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

As far as I know C++ Builder authors solved this problem by actual execution of child code in child process' address space (set IP to actual function, execute, and get the result, restore IP).
They realized that executing such a code could (in some cases) lead to changing internal program state. But in most cases calls like myvector[i] didn`t change anything important. To make their solution more flexible they even had Configuration checkbox like "[x] Allow side-effects" which was checked by default.
The rule is: when I type something into watches, I really want to know what it is and I implicitly agree with any side effects.
It seems good solution to me: in most cases it is more important to have all visible during debug, and it make no problem. But if it is crucial, one may disable this any time he wants.
Re: Are there any plans supporting Vector/Array/Map::operator[] during debug? [message #21227 is a reply to message #21190] Sun, 10 May 2009 11:49 Go to previous message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
If the [] operator is const, it should not change anything internally, i.e. if the whole chain of such needed functions are const, you are quite safe to use such hack.

Although I have a *feeling* (didn't even think about it) this may be hard to write, hard to maintain and hard to make crossplatform.

Maybe Mirek will come with better (edit: I meant more like "simpler") hack, after all as long as we are speaking about built in NTL classes, nobody knows them better then him. Smile

[Updated on: Sun, 10 May 2009 11:49]

Report message to a moderator

Previous Topic: Project isn't portable from windows to linux
Next Topic: how to solve? (add compiler option -> solved)
Goto Forum:
  


Current Time: Thu Mar 28 20:58:53 CET 2024

Total time taken to generate the page: 0.01531 seconds