1 // TEST_CFLAGS -Wno-deprecated-declarations
5 #include <objc/objc-gdb.h>
6 #include <objc/runtime.h>
13 // Class should not be realized yet
14 // fixme not true during class hash rearrangement
15 // result = NXMapGet(gdb_objc_realized_classes, "TestRoot");
16 // testassert(!result);
19 // Now class should be realized
21 result = (__bridge Class)(NXMapGet(gdb_objc_realized_classes, "TestRoot"));
23 testassert(result == [TestRoot class]);
25 result = (__bridge Class)(NXMapGet(gdb_objc_realized_classes, "DoesNotExist"));
28 // Class structure decoding
30 uintptr_t *maskp = (uintptr_t *)dlsym(RTLD_DEFAULT, "objc_debug_class_rw_data_mask");