Re: How to watch the WTF::String in visual studio?

214 views
Skip to first unread message

Patrick Gansterer

unread,
Dec 8, 2012, 4:40:16 AM12/8/12
to wince...@googlegroups.com
On Wednesday, December 5, 2012 10:23:58 AM UTC+1, Dong wrote:
For example

KURL::KURL(ParsedURLStringTag, const String& url)
{
    parse(url);
    ASSERT(url == m_string);
}

I want to check the url passed in. But in watch window, it shows

url {m_impl={...}}
     m_impl {m_ptr=0x00000002}
                 m_ptr 0x00000002 {m_refCount=0x00000000 m_length=0x00000000 ...}
                     m_refCount          0x00000000
                     m_length             0x00000000
                     m_data8              0x00000000<Bad Ptr>
                     m_data16             0x00000000<Bad Ptr>
                     m_buffer              0x00000000{void*}
                     m_substringbuffer              0x00000000{m_refCount=??? m_length=??? m_data8???}
                     m_copyData16             0x00000000<Bad Ptr>
                     m_hasAndFlags             0x00000000

Why?
I'm using visual studio 2005, configurations is RelWithDebInfo.

Usually the content of a WTF::String should be stored in the m_data8 (Latin1) or m_data16 (UTF16). From my personal experience I can say that RelWithDebInfo never worked. So if I wanted to Debug code I turned off the optimizations for the files I wanted to Debug, but not for all since then the binary was to big to start.

-- Patrick 

talking1239

unread,
Dec 10, 2012, 1:45:54 AM12/10/12
to wince...@googlegroups.com

You can use the printf to check the log information.

 

From: talking1239+caf_=talking1239=126...@gmail.com [mailto:talking1239+caf_=talking1239=126...@gmail.com] On Behalf Of Dong
Sent: 2012
125 17:24
To: wince...@googlegroups.com
Subject: [wincewebkit] How to watch the WTF::String in visual studio?

 

For example

KURL::KURL(ParsedURLStringTag, const String& url)
{
    parse(url);
    ASSERT(url == m_string);
}

I want to check the url passed in. But in watch window, it shows

url {m_impl={...}}
     m_impl {m_ptr=0x00000002}
                 m_ptr 0x00000002 {m_refCount=0x00000000 m_length=0x00000000 ...}
                     m_refCount          0x00000000
                     m_length             0x00000000
                     m_data8              0x00000000<Bad Ptr>
                     m_data16             0x00000000<Bad Ptr>
                     m_buffer              0x00000000{void*}
                     m_substringbuffer              0x00000000{m_refCount=??? m_length=??? m_data8???}
                     m_copyData16             0x00000000<Bad Ptr>
                     m_hasAndFlags             0x00000000

Why?
I'm using visual studio 2005, configurations is RelWithDebInfo.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Windows CE WebKit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/wincewebkit/-/DBGjl8U0OJ8J.
To post to this group, send email to wince...@googlegroups.com.
To unsubscribe from this group, send email to wincewebkit...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wincewebkit?hl=en.

Salisbury, Mark

unread,
Dec 10, 2012, 11:28:00 AM12/10/12
to wince...@googlegroups.com

I haven’t tried this yet myself but have bookmarked this:

 

http://www.chromium.org/developers/how-tos/how-to-set-up-visual-studio-debugger-visualizers#TOC-WebKit-specific-visualizers

 

Note that WTF::String used to live in the WebCore namespace, so you’ll have to tweak that.

 

Mark

Reply all
Reply to author
Forward
0 new messages