def setup_pageflags(cls, gdbtype: gdb.Type) -> None:
        for field in gdbtype.fields():
            cls.pageflags[field.name] = field.enumval

        cls.setup_pageflags_done = True
        if cls.setup_page_type_done and not cls.setup_pageflags_finish_done:
            cls.setup_pageflags_finish()

        cls.PG_slab = 1 << cls.pageflags['PG_slab']
        cls.PG_lru = 1 << cls.pageflags['PG_lru']