New issue
Advanced search Search tips

Issue 866697 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Add libc++ pretty printers to tools/gdb

Project Member Reported by thomasanderson@chromium.org, Jul 23

Issue description

Now that Chrome needs a custom gdbinit to be debugged anyway, we should add libc++ pretty printers in tools/gdb.
 
Cc: leszeks@chromium.org
+leszeks I want to add your code to tools/gdb
https://github.com/LeszekSwirski/libcxx-pretty-printers/tree/master/src

I noticed there's no license associated with that repo.  Mind if I clone that repo in third_party, or more directly copy printers.py to tools/gdb?
Hm, I guess it has the same license as what it was forked from, https://github.com/koutheir/libcxx-pretty-printers -- which also appears to be blank. I think you'll have to contact the author of that first.
Thanks, I spoke with the original author and he updated the LICENSE file with GPLv3.  Could you merge that change into your repo?
Done.
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/838a2b67ba1edde3e198915d730a38f9fb1a570e

commit 838a2b67ba1edde3e198915d730a38f9fb1a570e
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Mon Jul 30 17:58:27 2018

Add libc++ pretty printers to tools/gdb

Turns this:

separator = {
  <std::__1::__basic_string_common<true>> = {<No data fields>},
  members of std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >:
  static __short_mask = 1,
  static __long_mask = 1,
  __r_ = {
    <std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {
      __value_ = {
        {
          __l = {
            __cap_ = 2108420,
            __size_ = 0,
            __data_ = 0x0
          },
          __s = {
            {
              __size_ = 4 '\004',
              __lx = 4 '\004'
            },
            __data_ = ", ", '\000' <repeats 20 times>
          },
          __r = {
            __words = {[0] = 2108420, [1] = 0, [2] = 0}
          }
        }
      }
    },
    <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {
      <std::__1::allocator<char>> = {<No data fields>}, <No data fields>}, <No data fields>},
  static npos = 18446744073709551615
}

Into this:

separator = ", "

BUG= 866697 
R=thakis
CC=leszeks

Change-Id: I4b35799c6023743b5876aa89a2448b8f841c7751
Reviewed-on: https://chromium-review.googlesource.com/1152087
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579085}
[add] https://crrev.com/838a2b67ba1edde3e198915d730a38f9fb1a570e/third_party/libcxx-pretty-printers/LICENSE
[add] https://crrev.com/838a2b67ba1edde3e198915d730a38f9fb1a570e/third_party/libcxx-pretty-printers/OWNERS
[add] https://crrev.com/838a2b67ba1edde3e198915d730a38f9fb1a570e/third_party/libcxx-pretty-printers/README.chromium
[add] https://crrev.com/838a2b67ba1edde3e198915d730a38f9fb1a570e/third_party/libcxx-pretty-printers/README.md
[add] https://crrev.com/838a2b67ba1edde3e198915d730a38f9fb1a570e/third_party/libcxx-pretty-printers/src/gdbinit
[add] https://crrev.com/838a2b67ba1edde3e198915d730a38f9fb1a570e/third_party/libcxx-pretty-printers/src/libcxx/__init__.py
[add] https://crrev.com/838a2b67ba1edde3e198915d730a38f9fb1a570e/third_party/libcxx-pretty-printers/src/libcxx/v1/__init__.py
[add] https://crrev.com/838a2b67ba1edde3e198915d730a38f9fb1a570e/third_party/libcxx-pretty-printers/src/libcxx/v1/printers.py
[modify] https://crrev.com/838a2b67ba1edde3e198915d730a38f9fb1a570e/tools/gdb/gdbinit

Status: Fixed (was: Assigned)

Sign in to add a comment