igogo-x86 / HexRaysPyTools

IDA Pro plugin which improves work with HexRays decompiler and helps in process of reconstruction structures and classes
1.41k stars 224 forks source link

error when i Finalized #26

Closed GeT1t closed 5 years ago

GeT1t commented 5 years ago

File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\forms.py", line 99, in btn_pack.clicked.connect(lambda: self.structure_model.pack_substructure(struct_view.selectedIndexes())) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 744, in pack_substructure tinfo = self.pack(start, stop) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 548, in pack udt_data.push_back(item.get_udt_member(offset=origin)) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 326, in get_udt_member tid = self.import_to_structures() File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 269, in import_to_structures self.create_tinfo(), self.vtable_name, None) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 244, in create_tinfo udt_data.push_back(function.get_udt_member()) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 138, in get_udt_member udt_member.name = self.name File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 151, in name return common.demangled_name_to_c_str(name) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\common.py", line 11, in demangled_name_to_c_str if not BAD_C_NAME_PATTERN.findall(name): TypeError: expected string or buffer

igogo-x86 commented 5 years ago

Looks like there's some problem with names of virtual functions. Could you show screenshots in IDA-View of virtual tables that are part of a structure being reconstructed?

GeT1t commented 5 years ago

MPK(LE@QV`H@`(EWU %`IE9

igogo-x86 commented 5 years ago

Are those functions in thumb mode of ARM architecture? Seems like I've fixed the issue, so you can test it

GeT1t commented 5 years ago

not work. error again

File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\forms.py", line 94, in btn_finalize.clicked.connect(lambda: self.structure_model.finalize()) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 708, in finalize if self.pack(): File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 544, in pack udt_data.push_back(item.get_udt_member(offset=origin)) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 322, in get_udt_member tid = self.import_to_structures() File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 265, in import_to_structures self.create_tinfo(), self.vtable_name, None) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 240, in create_tinfo udt_data.push_back(function.get_udt_member()) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 138, in get_udt_member udt_member.name = self.name File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\temporary_structure.py", line 151, in name return common.demangled_name_to_c_str(name) File "C:/Program Files/IDA 7.0/plugins\HexRaysPyTools\core\common.py", line 11, in demangled_name_to_c_str if not BAD_C_NAME_PATTERN.findall(name):

GeT1t commented 5 years ago

functions is in thumb mode of ARM architecture

igogo-x86 commented 5 years ago

Oops, my bad. What about now?

GeT1t commented 5 years ago

working! good job