insndb/core: walk over opcode value and mask
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 3 Sep 2023 06:38:10 +0000 (09:38 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sun, 10 Sep 2023 20:29:53 +0000 (23:29 +0300)
src/openpower/insndb/core.py

index 1850def6d11ee7ad716956c2e48decc462189f93..867f9c4b76c7c3c498cda18c1a3c5b9e484fed44 100644 (file)
@@ -3738,6 +3738,12 @@ class Walker(mdis.walker.Walker):
     def dispatch_database(self, node):
         yield from self(tuple(node))
 
+    @mdis.dispatcher.Hook(Opcode)
+    def dispatch_opcode(self, node):
+        for key in ("value", "mask"):
+            value = getattr(node, key)
+            yield (value, node, key, mdis.walker.AttributePath)
+
     @mdis.dispatcher.Hook(Record)
     def dispatch_record(self, node):
         self.__record = node