Projects STRLCPY IDAGolangHelper Commits b844e6ce
🤬
  • fix error happened when interface used as structure type

  • Loading...
  • grokeus committed 6 years ago
    b844e6ce
    1 parent 5df37376
  • ■ ■ ■ ■ ■
    GO_Utils/Types.py
    skipped 5 lines
    6 6   self.standardTypes = [
    7 7   ("string",[("ptr","*char"), ("len", "uintptr")]),
    8 8   ("slice", [("data","*char"),("len", "uintptr"), ("cap", "uintptr")]),
    9  - ("iface", [("itab","*char"),("ptr","*char")])
     9 + ("__iface", [("itab","*char"),("ptr","*char")])
    10 10   ]
    11 11   
    12 12   self.commonTypes = [
    skipped 422 lines
    435 435   if size != 0:
    436 436   offset_kind = idc.GetMemberOffset(sid_type, "kind")
    437 437   kind_of_type = self.getKindEnumName(type_addr)
     438 + print kind_of_type
    438 439   if kind_of_type == "STRUCT_": #Disabled for now
    439 440   name_type = self.getName(type_addr)
    440 441   while name_type[0] == "*":
    skipped 7 lines
    448 449   elif kind_of_type == "SLICE":
    449 450   fields.append((fieldname, "slice"))
    450 451   elif kind_of_type == "INTERFACE":
    451  - fields.append((fieldname, "iface"))
     452 + fields.append((fieldname, "__iface"))
    452 453   else:
    453 454   fields.append((fieldname, "char [%d]" % size))
    454 455   if curr_offset != self_size:
    skipped 173 lines
Please wait...
Page is in error, reload to recover