Info.__init__ currently assigns `self.predicate = None`. This was
helpful to ensure that all component types had a `predicate` attribute.
The generator code could then avoid having code like "if the component
is anything but Info, use predicate". Since the previous commit, all
component types have a predicate attribute which defaults to False. We
can therefore remove the assignment in Info.__init__, and in turn remove
Info.__init__. We however need to make the printer parameter of
_Component.__init__ optional, as Info don't need a printer.
Change-Id: I611edeca9cc9837eb49dddfe038595e1ff3b7239
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
self,
name,
type,
- printer,
+ printer=None,
comment=None,
predicate=False,
predefault=None,
class Info(_Component):
"An Info component is copied from the gdbarch_info."
- def __init__(self, *, name, type, printer=None):
- super().__init__(name=name, type=type, printer=printer)
- # This little hack makes the generator a bit simpler.
- self.predicate = None
-
class Value(_Component):
"A Value component is just a data member."