From 6d33cb4e88a764905e051b2f6b4bc57459c6a943 Mon Sep 17 00:00:00 2001 From: Stephen Eckels Date: Thu, 12 Oct 2023 10:49:26 -0400 Subject: [PATCH] Change interface type name to match IDA --- objfile/objfile.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/objfile/objfile.go b/objfile/objfile.go index 44b728f..74a55b1 100644 --- a/objfile/objfile.go +++ b/objfile/objfile.go @@ -1431,7 +1431,7 @@ func (e *Entry) ParseType_impl(runtimeVersion string, moduleData *ModuleData, ty } interfaceDef := fmt.Sprintf("type %s interface {", _type.Str) - cinterfaceDef := fmt.Sprintf("struct %s_interface {\n", _type.CStr) + cinterfaceDef := fmt.Sprintf("struct %s {\n", _type.CStr) // type imethod struct { // name *string // name of method @@ -1519,11 +1519,9 @@ func (e *Entry) ParseType_impl(runtimeVersion string, moduleData *ModuleData, ty interfaceDef := "type interface {" cinterfaceDef := "struct interface {\n" - (*_type).CStr = "interface_" if _type.flags&tflagNamed != 0 { interfaceDef = fmt.Sprintf("type %s interface {", _type.Str) - cinterfaceDef = fmt.Sprintf("struct %s_interface {\n", _type.CStr) - (*_type).CStr = fmt.Sprintf("%s_interface", _type.CStr) + cinterfaceDef = fmt.Sprintf("struct %s {\n", _type.CStr) } // type imethod struct {