diff --git a/sdb/command.py b/sdb/command.py index 9d5e09df..0e3ff51d 100644 --- a/sdb/command.py +++ b/sdb/command.py @@ -605,13 +605,13 @@ def _call(self, objs: Iterable[drgn.Object]) -> Iterable[drgn.Object]: the types as we go. """ assert self.input_type is not None - type_ = target.get_type(self.input_type) + expected_type = type_canonicalize_name(self.input_type) for obj in objs: - if obj.type_ != type_: + if type_canonical_name(obj.type_) != expected_type: raise CommandError( self.name, 'expected input of type {}, but received {}'.format( - type_, obj.type_)) + expected_type, type_canonical_name(obj.type_))) yield from self.walk(obj)