Hi.
It looks like your task should be relatively easy since you have the full 
definition of the UniString and the SharedBuffer.
I am assuming you will want to show the string content as your summary (as it 
happens for std::string and NSString).
If so, how are you going to use the string buffer? Is it going to contain a 
pointer to the real data?
I am probably slightly confused by your comment next to it.
Could you explain the logic for storing the string data or provide an example 
of code that handles e.g. the string allocation, or access to it?
Given that understanding, it should be relatively straightforward to accomplish 
your task.

Enrico Granata
✉ egranata@.com
✆ (408) 972-7683

On Dec 10, 2012, at 7:35 AM, "Somorjai, Akos" <[email protected]> wrote:

> Hello everyone,
> 
> I need a little help with a custom formatter for the class below; I'd 
> appreciate if someone could throw together a skeleton I can start from.
> 
> Thanks,
> 
> Akos
> 
> 
> Here's the class layout:
> 
> class UniString {
> 
> private:
>       struct SharedBuffer;
> 
>       SharedBuffer*   content;        // shared buffer storing content of the 
> string
> 
>               // Implementation classes and structures
> 
>       struct SharedBuffer {
>               USize                   length;                 // length of 
> the string in UniChar::Layout units
>               USize                   capacity;               // capacity of 
> the allocated buffer in UniChar::Layout units
>               SInt32                  refCounter;             // stores 
> number of references to this shared buffer
>               char                    reserved[2];            // padding 
> reserved for the future use
>               unichar                 string[1];                      // 
> buffer storing content of the string (extends beyond of the SharedBuffer)
> 
>               inline SharedBuffer ();
>               inline SharedBuffer (USize initialLength, USize 
> initialCapacity, Int32 initialRefCounter);
>       };
> …
> };
> 
> 
> _______________________________________________
> lldb-dev mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to