• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How do I view contents of a simple C buffer in XCode debugger?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How do I view contents of a simple C buffer in XCode debugger?
      • From: "Dave Opstad" <email@hidden>
    • Re: How do I view contents of a simple C buffer in XCode debugger?
      • From: Markian Hlynka <email@hidden>
  • Prev by Date: Re: search paths
  • Next by Date: Re: search paths
  • Previous by thread: Re: RTTI Preprocessor flag
  • Next by thread: Re: How do I view contents of a simple C buffer in XCode debugger?
  • Index(es):
    • Date
    • Thread