How do I view contents of a simple C buffer in XCode debugger?
How do I view contents of a simple C buffer in XCode debugger?
- Subject: How do I view contents of a simple C buffer in XCode debugger?
- From: Julian Vrieslander <email@hidden>
- Date: Sat, 02 Apr 2005 01:42:29 -0800
- Fnork: garbanzo
Let's say that I have an instance variable, or a local variable within a
method, which is a pointer to an allocated buffer:
// create a buffer, whose size is determined at run time
long count = [someObject count];
short *buf;
buf = malloc(count * sizeof(short));
// code that fills buffer with some values
Now I stop at a breakpoint in the debugger, and I want to inspect the data.
Can I get the XCode debugger to display a table showing the indexes and
values for the elements in the buffer?
I can't recall exactly how I used to do this in CodeWarrior, but I think
there was a way to view the buffer as an array. I have been trying to do
this in XCode, using the "View Values As..." and "View Variable as an
Expression" commands. No luck so far. I read the section on Custom Data
Formatters in XCode help, but the explanation of the syntax makes no sense
to me. Google and CocoaBuilder didn't come back with anything either.
Thanks for any tips...
--
Julian Vrieslander <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden