From 58fe72ab83ab6490b9a09e71f5762f2a12bd2c5a Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sun, 30 Aug 2026 17:30:35 +0200 Subject: kstd/gdb: add error_code and result printers --- libs/kstd/gdb/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libs/kstd/gdb/__init__.py') 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 -- cgit v1.2.3