diff options
| author | Xusheng <xusheng@vector35.com> | 2021-05-31 15:46:57 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2021-06-11 10:37:10 +0800 |
| commit | 93f91f8d2f1fef1866b3ee87042ec62f99a8d087 (patch) | |
| tree | 55a6439dcf66d005eaa3493fe6eb190c6338b47e /suite | |
| parent | 7954a49df95eba2ec7efeca3b4493a6c51070236 (diff) | |
Add TypeReferenceChanged notification
Diffstat (limited to 'suite')
| -rw-r--r-- | suite/testcommon.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/suite/testcommon.py b/suite/testcommon.py index 451ff7a4..6941f8b3 100644 --- a/suite/testcommon.py +++ b/suite/testcommon.py @@ -968,6 +968,9 @@ class TestBuilder(Builder): def type_undefined(self, view, name, type): results.append("type undefined: {0}".format(name)) + def type_ref_changed(self, view, name, type): + results.append("type reference changed: {0}".format(name)) + test = NotifyTest() bv.register_notification(test) sacrificial_addr = 0x84fc @@ -1001,6 +1004,12 @@ class TestBuilder(Builder): bv.remove(sacrificial_addr, 4) bv.update_analysis_and_wait() + type, _ = bv.parse_type_string("struct { uint64_t bar; }") + bv.define_user_type('foo', type) + func = bv.get_function_at(0x8440) + func.return_type = binja.Type.named_type_from_type('foo', type) + bv.update_analysis_and_wait() + bv.unregister_notification(test) return fixOutput(sorted(results)) |
