11 Commits

Author SHA1 Message Date
Vadim Godunko
a75a737517 Update GDB pretty printer 2025-07-21 15:35:03 +04:00
Vadim Godunko
5fb274332c Workaround of GDB bug 2025-06-17 09:39:06 +04:00
Vadim Godunko
177e9a72a4 Update names of the types. 2025-02-17 18:29:27 +04:00
Tom Tromey
8dd8c5457b String-related fixes to pretty-printer
This patch combines a few small string-related fixes to the
pretty-printer:

* The display_hint method is uncommented.  This hint lets gdb print
  strings more nicely.

* gdb's built-in string-decoding is used in favor of decoding UTF-8 by
  hand.

* Empty strings are printed as such.

eng/ide/VSS#257
2024-12-04 11:28:26 -07:00
Tom Tromey
c283256680 Do not 'print' from pretty-printer
Despite the name, a pretty-printer should not print anything directly.

In this particular spot, I think the 'print' is actually more like an
assertion.  This patch changes it to raise an exception instead.
2024-12-03 11:59:45 -07:00
Tom Tromey
b5165fdf66 Reimplement pretty-printer registration
This reimplements the VSS pretty-printer registration.  The main
benefit of this is that "info pretty-printers" now displays a somewhat
nicer name for the printer.
2024-12-03 11:59:45 -07:00
Tom Tromey
081c801ced Derive pretty-printer from gdb.ValuePrinter
GDB 14 added gdb.ValuePrinter, a tag class that pretty-printers can
use to indicate that they conform to the "extended" pretty-printer
protocol.  Although it doesn't really matter for this printer, it is
best practice to use this.  The printer has to rename its private
attributes in order to conform.
2024-12-03 11:59:40 -07:00
Tom Tromey
cf2153aaf8 Import gdb
If the pretty-printer is ever imported, then it is important that it
"import gdb".
2024-12-03 11:53:59 -07:00
Vadim Godunko
c1b975aab9 Fix size of the tag on 32bit platforms. 2024-07-08 12:21:43 +04:00
Vadim Godunko
ae51919c7f Update GDB pretty-printer 2024-07-03 13:08:24 +04:00
Vadim Godunko
f444b77d78 U713-022 GDB's pretty-printer to display content of the Virtual_String. 2021-08-20 09:09:52 +03:00