Re: Customizing variable's summary
Re: Customizing variable's summary
- Subject: Re: Customizing variable's summary
- From: Ricky Sharp <email@hidden>
- Date: Tue, 11 Nov 2003 11:56:26 -0800
On Tuesday, November 11, 2003, at 11:05AM, Jim Ingham <email@hidden> wrote:
>On Nov 11, 2003, at 8:33 AM, Randy Croucher wrote:
>
>> Thank you very much, I've been playing with it this morning. Looks
>> kind of cool. I will experiment with writing a bundle next.
>>
>
>This can be very powerful, but you need to exercise a bit of caution in
>writing these plugins.
>
>Remember that this code will be running in the context of your target
>program, so you shouldn't do anything that changes state.
>
>You also should try to be fault tolerant. For instance, the code you
>are breaking in might do something like:
>
>
>int myFunc ()
>{
> MyClass *foo;
>
> // Some code
>
> foo = new MyClass (5);
>
> // Some more code
>
>}
>
>If you break in the "// Some code" section, then foo is not going to be
>valid yet, but Xcode has no way of knowing that, so we will still call
>your data formatter. If the data formatter function crashes with an
>access violation, that is okay, gdb can clean up after the call and
>return the program to its previous state. But you should be careful
>that this is the worst that will happen...
Would it be better than crashing to basically code up an "is pointer valid" routine? Someone posted to carbon-dev some clever code (that uses mach-messages?) to see if a pointer is valid within the current context. Is there perhaps an API that can be called to give us such functionality, or would each plugin developer potentially need to roll their own solution?
Rick Sharp
Instant Interactive(tm)
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.