[lldb-dev] how to display data member in anonymous union/struct?

Yingshen Yu yingshen.yu at gmail.com
Tue Jun 12 20:35:26 PDT 2012

Hi experts,

I'm using LLDB to debug,  and I met a problem with the anonymous

One of my class has union of structs. like below:

class MyString
    unsigned char type;
    union {
        struct {
             char mnPad2[kArraySize];
             union {
                wchar_t* mpData;
        struct {
             char mnPad1;
             wchar_t  mwszStr[kArraySize];

I have a MyString*  names pMyStr; My questions:

1) how can I refer to data member mnPad2 and mpData?,    I tried
pMyStr->flags works ok, but pMyStr->mnPad2 doesn't work.
2) I also want to write a python function to set a type summary, how can I
get these data members in Python?

Thanks in advance!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20120613/455d5527/attachment.html>

More information about the lldb-dev mailing list