• 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 Custom Data Types in Debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying Custom Data Types in Debugger


  • Subject: Re: Displaying Custom Data Types in Debugger
  • From: Graham Westlake <email@hidden>
  • Date: Mon, 18 Jul 2005 12:50:43 +0100

On 16 Jul 2005, at 21:40, Chris Espinosa wrote:

You write a simple .c file that #includes " /Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Headers/DataFormatterPlugin.h", and a function that returns a char * given a pointer to your Unicode string.  Compile that into a plugin that's structured like the CarbonDataFormatter.bundle, and put in the plist the _expression_ that calls your function.


Because to return a char * from your Unicode string you probably have to allocate memory temporarily, you use the ID passed in the _expression_ and pass it to the _pbxgdb_allocator(size, ID) function to allocate space for the char *.  Xcode will free this memory when your variable goes out of scope.



I've followed these instructions while attempting to write a plugin to display the contents of a C++ class, but I'm not having much luck - GDB crashes when I try to view my variable. 

One necessary change I've made is to compile my plugin code as C++; is this likely to be causing a problem? I've tried declaring the formatting function as extern "C" but it hasn't helped. Also, how is my C++ variable passed to the formatting function?

Thanks,

Graham Westlake
Sibelius Software
 



 _______________________________________________
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: Displaying Custom Data Types in Debugger
      • From: Michael Rice <email@hidden>
References: 
 >Displaying Custom Data Types in Debugger (From: Michael Rice <email@hidden>)
 >Re: Displaying Custom Data Types in Debugger (From: Chris Espinosa <email@hidden>)
 >Re: Displaying Custom Data Types in Debugger (From: Michael Rice <email@hidden>)
 >Re: Displaying Custom Data Types in Debugger (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Universal Binary that runs on 10.3.x and up on PPC and 10.4.1 and up on Intel
  • Next by Date: Re: Universal Binary that runs on 10.3.x and up on PPC and 10.4.1 and up on Intel
  • Previous by thread: Re: Displaying Custom Data Types in Debugger
  • Next by thread: Re: Displaying Custom Data Types in Debugger
  • Index(es):
    • Date
    • Thread