diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-08-30 17:30:35 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-08-30 17:30:35 +0200 |
| commit | 58fe72ab83ab6490b9a09e71f5762f2a12bd2c5a (patch) | |
| tree | 87527422732ec9dc022fcd4f0e21b4b36d3f4470 /libs/kstd/gdb/__init__.py | |
| parent | 3e87bb1da9e4980286d0d44b29f22a5dc8bb33d5 (diff) | |
| download | kernel-58fe72ab83ab6490b9a09e71f5762f2a12bd2c5a.tar.xz kernel-58fe72ab83ab6490b9a09e71f5762f2a12bd2c5a.zip | |
kstd/gdb: add error_code and result printers
Diffstat (limited to 'libs/kstd/gdb/__init__.py')
| -rw-r--r-- | libs/kstd/gdb/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/kstd/gdb/__init__.py b/libs/kstd/gdb/__init__.py index 0cdafffd..018b31f2 100644 --- a/libs/kstd/gdb/__init__.py +++ b/libs/kstd/gdb/__init__.py @@ -1,15 +1,17 @@ import gdb.printing -from .units import KstdBytesPrinter -from .vector import KstdVectorPrinter -from .string import KstdStringPrinter +from .error_code import KstdErrorCodePrinter +from .result import KstdResultPrinter from .smart_pointers import ( KstdUniquePtrPrinter, KstdSharedPtrPrinter, KstdObserverPtrPrinter, KstdWeakPtrPrinter, ) +from .string import KstdStringPrinter +from .units import KstdBytesPrinter +from .vector import KstdVectorPrinter def build_pretty_printers(): @@ -22,6 +24,8 @@ def build_pretty_printers(): pp.add_printer("observer_ptr", "^kstd::observer_ptr<.*>$", KstdObserverPtrPrinter) pp.add_printer("bytes", "^kstd::basic_unit<.*, kstd::bytes_tag, .*>$", KstdBytesPrinter) pp.add_printer("offset", "^kstd::basic_unit<.*, kstd::byte_offset_tag, .*>$", KstdBytesPrinter) + pp.add_printer("error_code", "^kstd::error_code$", KstdErrorCodePrinter) + pp.add_printer("result", "^std::expected<.*, kstd::error_code>$", KstdResultPrinter) return pp |
