15 Commits

Author SHA1 Message Date
David Blaikie
49044733df Fix GDB pretty printer for Optional after r354246
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361870 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-28 20:22:16 +00:00
Serge Guelton
19b8509e55 Python compat - iterator protocol
In Python2 next() is used wile it's __next__ in Python3.

Differential Revision: https://reviews.llvm.org/D56250

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350326 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 15:43:14 +00:00
Serge Guelton
60ccceba74 Python compat - print statement
Make sure all print statements are compatible with Python 2 and Python3 using
the `from __future__ import print_function` statement.

Differential Revision: https://reviews.llvm.org/D56249

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350307 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 14:11:33 +00:00
Fangrui Song
94363b3cf6 [gdb] Fix SmallVector pretty printer after r337514
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337747 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 21:33:51 +00:00
Philip Pfaffe
378d508446 [Utils] Fix gdb pretty printers to work with Python 3.
Reiterate D23202 for container printers added after the change landed.

Differential Revision: https://reviews.llvm.org/D46578

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336580 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-09 18:51:50 +00:00
Fangrui Song
d411816d5c [gdb] Escape unprintable bytes in SmallString and StringRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335561 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-26 00:41:49 +00:00
Fangrui Song
649e247b1c [gdb] Add pretty printer for Expected
Reviewers: dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D48512

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335554 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-25 23:38:48 +00:00
Fangrui Song
c22e38d4bb [gdb] Use Latin-1 to decode StringRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335387 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-22 20:29:42 +00:00
Fangrui Song
ebb24b101d [gdb] Update llvm::Optional
Reviewers: dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D48461

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335303 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-21 22:34:29 +00:00
David Blaikie
8c1cc236e0 Make the Twine pretty-printer work with GDB 7.11
Apparently ::NodeKind is sometimes part of the name in GDB.
Without this patch I get the following error message from GDB:
`Unhandled NodeKind llvm::Twine::NodeKind::EmptyKind`.

Patch by Alexander Richardson!

Differential Revision: https://reviews.llvm.org/D32795

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304675 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-04 03:27:12 +00:00
David Blaikie
312b28eb63 Add GDB pretty-printer for llvm::Twine type
Patch by Simon Marchi!

Differential Revision: https://reviews.llvm.org/D30994

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297889 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-15 20:51:44 +00:00
David Blaikie
980f5c56b4 GDB pretty printers: Basic DenseMap support
Still prints the empty/tombstone keys (which some people would prefer,
but I find pretty noisy) because I haven't yet found a reliable way to
skip them (it requires calling into the running process to do so, which
isn't ideal for a pretty printer (doesn't work on a core file, for
example) - and gdb's ability to do so (or my ability to figure out how
to get gdb to do so) is limited) left some breadcrumbs for the next
person who might try to address that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290011 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16 23:53:14 +00:00
David Blaikie
4bdcc320cf GDB pretty printer for llvm::Optional
(some other implementations of an optional pretty printer print the full
name of the optional type (including template parameter) - but seems if
the template parameter isn't printed for std::vector, not sure why it
would be printed for optional, so erring on the side of consistency in
that direction here - compact, etc, as well)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289976 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16 19:16:22 +00:00
Igor Kudrin
9c9f23ffe5 Fix gdb pretty printers to work with Python 3.
Differential Revision: https://reviews.llvm.org/D23202

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277833 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 16:48:31 +00:00
David Blaikie
ed2188ea17 Reference gdb python type printer scripts from SmallString, SmallVector, ArrayRef, and StringRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 01:02:32 +00:00