• 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
(Newbie) Debugger and Unsigned char x = 0;
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(Newbie) Debugger and Unsigned char x = 0;


  • Subject: (Newbie) Debugger and Unsigned char x = 0;
  • From: Chris Outwin <email@hidden>
  • Date: Thu, 2 Jun 2005 13:41:23 -0500

I'm using Xcode 1.5 on Mac OS X 10.3.9 to make an Objective-C, doc app.

My question is how do you get the debugger display zero as 0x00 for a dereferenced pointer to an unsigned char.

I am reassigning values in memory created by CFDataCreateMutable(kCFAllocatorDefault, totalBytes); The debugger prints hexadecimal code for values 1 to 255 fine, but when it reaches a zero value it does different things. Here's some examples of what I've tried.

*ptr = (unsigned char)0; // The debugger prints nothing
*ptr = 0x00; // The debugger prints nothing
*prt = 0; // The debugger prints nothing


*ptr = '0'; // The debugger prints 0
*ptr = '\0x00'; // The debugger prints 0

Are the the zero values displayed in the summary view really 0x00?
 _______________________________________________
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: (Newbie) Debugger and Unsigned char x = 0;
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re: Proper way to link to libxml and zlib
  • Next by Date: Re: (Newbie) Debugger and Unsigned char x = 0;
  • Previous by thread: Re: Proper way to link to libxml and zlib
  • Next by thread: Re: (Newbie) Debugger and Unsigned char x = 0;
  • Index(es):
    • Date
    • Thread