• 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
Re: Subject: gdb & BOOL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subject: gdb & BOOL


  • Subject: Re: Subject: gdb & BOOL
  • From: Cameron Hayne <email@hidden>
  • Date: Wed, 30 Nov 2005 09:21:23 -0500

On 30-Nov-05, at 8:19 AM, Jonathan del Strother wrote:

Based on what you're telling me (and what I see for the BOOL #define), I would've expected this from gdb :
(gdb) p testBOOL
$1 = 1 '\001'

That's exactly what I get with the following program when I compile it with 'cc -g foo.m -o foo' and then run it under 'gdb':


#include <stdio.h>
#include <objc/objc.h>

int main()
{
    BOOL testBOOL = YES;
    printf("sizeof BOOL = %d\n", sizeof(BOOL));
    printf("testBOOL = %c\n", testBOOL);
    return 0;
}

And running it with './foo | vis' gives:
sizeof BOOL = 1
testBOOL = \^A

--
Cameron Hayne
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: Subject: gdb & BOOL
      • From: Jonathan del Strother <email@hidden>
References: 
 >Subject: gdb & BOOL (From: Thomas Engelmeier <email@hidden>)
 >Re: Subject: gdb & BOOL (From: Jonathan del Strother <email@hidden>)

  • Prev by Date: Re: Subject: gdb & BOOL
  • Next by Date: Re: Subject: gdb & BOOL
  • Previous by thread: Re: Subject: gdb & BOOL
  • Next by thread: Re: Subject: gdb & BOOL
  • Index(es):
    • Date
    • Thread