(anonymous namespace)::AtomicString Python pretty-printer?

74 views
Skip to first unread message

Jack Bates

unread,
Nov 12, 2016, 12:49:46 PM11/12/16
to chromi...@chromium.org
I loaded third_party/WebKit/Tools/gdb/webkit.py, but I'm still seeing:

> (gdb) p header.key
> $1 = {m_string = {m_impl = {m_ptr = 0x180cd5cc94a0}}}
> (gdb)

I suspect it's because the type is (anonymous namespace)::AtomicString?

> (gdb) whatis header.key
> type = (anonymous namespace)::AtomicString
> (gdb)

There's a WTF::AtomicString pretty printer in webkit.py, but I guess it
doesn't match (anonymous namespace)::AtomicString?
What am I doing wrong?

Nico Weber

unread,
Nov 15, 2016, 11:13:30 AM11/15/16
to ofw...@nottheoilrig.com, Chromium-dev
Since nobody else is replying: I'm surprised that you ended up with (anonymous namespace)::AtomicString, given that AtomicString is in WTF::. Maybe that's the problem?



--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:    http://groups.google.com/a/chromium.org/group/chromium-dev


Jack Bates

unread,
Nov 15, 2016, 4:44:46 PM11/15/16
to Nico Weber, Chromium-dev
Thanks, why did I end up with (anonymous namespace)::AtomicString vs.
WTF::AtomicString? Do you end up with the same thing?

> out/Default$ gdb -ex 'b blink::DocumentThreadableLoader::redirectReceived' -ex r --args chrome --single-process 127.0.0.1:8000/fetch/window/thorough/redirect.html
> GNU gdb (Debian 7.11.1-2) 7.11.1
> [...]
> Thread 27 "Chrome_InProcRe" hit Breakpoint 1, (anonymous namespace)::DocumentThreadableLoader::redirectReceived (this=0x1d9893cdc8c8, resource=0x1d9893cdcde0,
> request=..., redirectResponse=...)
> at ../../third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp:
> 492
> 492 DCHECK(m_client);
> (gdb) whatis request.m_httpHeaderFields.m_headers.m_impl.m_table[0].key
> type = (anonymous namespace)::AtomicString
> (gdb)

On 15/11/16 09:12 AM, Nico Weber wrote:
> Since nobody else is replying: I'm surprised that you ended up with
> (anonymous namespace)::AtomicString, given that AtomicString is in
> WTF::. Maybe that's the problem?
>
> On Sat, Nov 12, 2016 at 12:48 PM, Jack Bates <ofw...@nottheoilrig.com
> <mailto:ofw...@nottheoilrig.com>> wrote:
>
> I loaded third_party/WebKit/Tools/gdb/webkit.py, but I'm still seeing:
>
> > (gdb) p header.key
> > $1 = {m_string = {m_impl = {m_ptr = 0x180cd5cc94a0}}}
> > (gdb)
>
> I suspect it's because the type is (anonymous namespace)::AtomicString?
>
> > (gdb) whatis header.key
> > type = (anonymous namespace)::AtomicString
> > (gdb)
>
> There's a WTF::AtomicString pretty printer in webkit.py, but I guess
> it doesn't match (anonymous namespace)::AtomicString?
> What am I doing wrong?
>
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> <mailto:chromi...@chromium.org>
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
> <http://groups.google.com/a/chromium.org/group/chromium-dev>
>
>

Raphael

unread,
Jan 10, 2017, 11:15:45 AM1/10/17
to Chromium-dev, ofw...@nottheoilrig.com
On Tuesday, 15 November 2016 17:13:30 UTC+1, Nico Weber wrote:
Since nobody else is replying: I'm surprised that you ended up with (anonymous namespace)::AtomicString, given that AtomicString is in WTF::. Maybe that's the problem?

FWIW, I've had the same issue here for at least a few months ("GNU gdb (GDB) Fedora 7.12-29.fc25").

I haven't spent much time on it and I haven't looked for a root cause yet, but what I can see is that GDB seems to be confused by |is_clang=true| and |use_debug_fission=true| (a simple "info func" on libwtf.so shows the wrong namespace being used on most methods). Building with GCC is fine, as well as just disabling |use_debug_fission|.

Nico Weber

unread,
Jan 10, 2017, 12:58:12 PM1/10/17
to Raphael Kubo da Costa, Chromium-dev, ofw...@nottheoilrig.com
If someone has time to file a crbug with repro steps, that'd be cool.

Raphael

unread,
Jan 12, 2017, 3:34:33 PM1/12/17
to Chromium-dev, raphael.ku...@intel.com, ofw...@nottheoilrig.com
I've filed http://crbug.com/680654 with some additional information after bisecting GDB.
Reply all
Reply to author
Forward
0 new messages