• 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: Displaying the value of a reference parameter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying the value of a reference parameter


  • Subject: Re: Displaying the value of a reference parameter
  • From: Chris Espinosa <email@hidden>
  • Date: Mon, 28 Nov 2005 08:07:22 -0800

On Nov 27, 2005, at 11:32 AM, Steve Sisak wrote:

OSStatus CalcSomeSize(void* someParam, size_t& size)
{
    size += sizeof(Foo)

    return noErr;
}

When I'm in these functions, the Xcode debugger displays the size parameter as "@0xbfffe4bc" (address of the size_t) but refuses to display the value, making debugging the computation rather difficult.

If I change the parameter to size_t*, I can see the value and get work done, but this is clearly undesirable from an architectural standpoint.

Is this just a gdb bug/limitation or is there a way to get Xcode to display the value of reference parameters?

It's not a gdb limitation; if you go to the console and 'p size' it says:


$1 = (size_t&) @0xbffe4bc: 1

(or whatever the value of size is)

Open the Expressions window, and enter (size_t)size as the expression. And file a bug.

Chris

_______________________________________________
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


References: 
 >Displaying the value of a reference parameter (From: Steve Sisak <email@hidden>)

  • Prev by Date: Re: Integrating custom source code documentation in Xcode's documentation window?
  • Next by Date: Re: Troubles upgrading a XCode 1.5 project to 2.2
  • Previous by thread: Displaying the value of a reference parameter
  • Next by thread: Stepping over inline functions
  • Index(es):
    • Date
    • Thread