Thread: Debugging C programs in XCode
02-02-2011, 11:02 PM #1
Debugging C programs in XCode
- Member Since
- Feb 02, 2011
I programmed for years in Code Warrior. My last computer that can still run CW is dying, and I'm trying to make the jump to XCode.
One issue that is badly thwarting me when debugging is seeing the values within memory-allocated arrays and matrices. Most of the programs I write set these up based on data files that vary substantially in dimensions. Thus, I use commands like:int *v = (int*)malloc(length * sizeof (int));to create an array of length "sizeof".
My problem is that I can find no way to see the value of v, v, etc. (Many of my programs involve simulations, and before they are fully debugged, I wind up putting incorrect values into this array that subsequently causes a memory error in another array or matrix.)
Is there a simple way to do this? If not, then is there even a hard way to do this?
EDIT: And, yes, I am a bit of a dinosaur when it comes to coding.....
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By Yodda_Hunter in forum OS X - Apps and GamesReplies: 4Last Post: 06-12-2013, 10:00 AM
By skiabox in forum OS X - Development and DarwinReplies: 0Last Post: 11-07-2010, 04:44 PM
By cng11 in forum OS X - Development and DarwinReplies: 0Last Post: 03-28-2010, 11:30 PM
By MoltenWhale in forum OS X - Development and DarwinReplies: 0Last Post: 07-29-2008, 08:30 PM
By deanrayj in forum OS X - Development and DarwinReplies: 0Last Post: 04-25-2008, 09:33 PM