From b289927e3a9201f5d63e38dae1e8046b6ea876d6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Apr 2024 23:39:37 +0100 Subject: [PATCH] Loosen GDB utils constructors --- utils/gdb/seer_pretty_printers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/gdb/seer_pretty_printers.py b/utils/gdb/seer_pretty_printers.py index 0481d8d..494fb38 100644 --- a/utils/gdb/seer_pretty_printers.py +++ b/utils/gdb/seer_pretty_printers.py @@ -13,6 +13,8 @@ class Square(object): RANKS = list(map(lambda n: str(n + 1), range(8))) def __init__(self, val): + if isinstance(val, Square): + val = val._val self._val = val @classmethod @@ -37,6 +39,8 @@ class Bitboard(object): """ def __init__(self, val): + if isinstance(val, Bitboard): + val = val._val self._val = val def __str__(self):