summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README1
-rw-r--r--classy.py13
2 files changed, 14 insertions, 0 deletions
diff --git a/README b/README
index 39b7b88..beb901f 100644
--- a/README
+++ b/README
@@ -14,6 +14,7 @@ Supported so far:
- Save and reset database
- Classes:
- Create a class using an IDA struct
+ - Delete a class
- Base classes are handled using a struct field named _
- Struct is automatically created if one is not chosen - if this is used,
Classy adds the _ field for you
diff --git a/classy.py b/classy.py
index b032e94..54cb12d 100644
--- a/classy.py
+++ b/classy.py
@@ -596,6 +596,19 @@ def create_class():
Refresh()
+@menu_item('Delete Class')
+def delete_class():
+ cls = choose_class('Choose the class to delete', False)
+ if base != None:
+ name = cls.name
+ del db.class_by_struct[cls.struct]
+ del db.class_by_name[cls.name]
+ print("Deleted class %s" % name)
+ else:
+ Warning("No class chosen")
+ Refresh()
+
+
@menu_item('Set VTable')
def set_vtable():
cls = choose_class()