diff --git a/gengo/bind/sdkMerge/bug/CMakeLists.txt b/gengo/bind/sdkMerge/bug/CMakeLists.txt new file mode 100644 index 000000000..9a3a7ade7 --- /dev/null +++ b/gengo/bind/sdkMerge/bug/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.28) +project(bug C) + +set(CMAKE_C_STANDARD 11) + +include_directories(.) + +add_executable(bug + bug.h) diff --git a/gengo/bind/sdkMerge/bug/Stderr.log b/gengo/bind/sdkMerge/bug/Stderr.log index fb6f4b9ec..e69de29bb 100644 --- a/gengo/bind/sdkMerge/bug/Stderr.log +++ b/gengo/bind/sdkMerge/bug/Stderr.log @@ -1,19 +0,0 @@ -bug.h:11:10: error: unknown type name 'UINT64' - 11 | UINT64 Flags; - | ^ -bug.h:15:14: error: unknown type name 'UINT64' - 15 | UINT64 Pcid : 12; - | ^ -bug.h:16:14: error: unknown type name 'UINT64' - 16 | UINT64 PageFrameNumber : 36; - | ^ -bug.h:17:14: error: unknown type name 'UINT64' - 17 | UINT64 Reserved1 : 12; - | ^ -bug.h:18:14: error: unknown type name 'UINT64' - 18 | UINT64 Reserved_2 : 3; - | ^ -bug.h:19:14: error: unknown type name 'UINT64' - 19 | UINT64 PcidInvalidate : 1; - | ^ -6 errors generated. diff --git a/gengo/bind/sdkMerge/bug/bug.go b/gengo/bind/sdkMerge/bug/bug.go index 1e03a2b6b..c749144ed 100644 --- a/gengo/bind/sdkMerge/bug/bug.go +++ b/gengo/bind/sdkMerge/bug/bug.go @@ -1,58 +1,2 @@ // Code generated by gengo. DO NOT EDIT. package bug - -import ( - "unsafe" - - "github.com/can1357/gengo/gengort" -) - -const GengoLibraryName = "bug" - -var GengoLibrary = gengort.NewLibrary(GengoLibraryName) - -type ( - Cr3Type struct{} - Anon9_6 struct { - Raw [1]int32 - } -) -type Anon13_10 struct { - Pcid int32 - PageFrameNumber int32 - Reserved1 int32 - Reserved_2 int32 - PcidInvalidate int32 -} -type ( - _Int128T = any - _Uint128T = any - __NSConstantString = any - SizeT = uint64 - _BuiltinMsVaList = *byte - _BuiltinVaList = *byte - Pcr3Type = *Cr3Type -) - -func (s Anon9_6) Flags() int32 { - return gengort.ReadBitcast[int32](unsafe.Add(unsafe.Pointer(unsafe.SliceData(s.Raw[:])), 0)) -} - -func (s *Anon9_6) SetFlags(v int32) { - gengort.WriteBitcast(unsafe.Add(unsafe.Pointer(unsafe.SliceData(s.Raw[:])), 0), v) -} - -func (s Anon9_6) Fields() Anon13_10 { - return gengort.ReadBitcast[Anon13_10](unsafe.Add(unsafe.Pointer(unsafe.SliceData(s.Raw[:])), 0)) -} - -func (s *Anon9_6) SetFields(v Anon13_10) { - gengort.WriteBitcast(unsafe.Add(unsafe.Pointer(unsafe.SliceData(s.Raw[:])), 0), v) -} - -// Gengo init function. -func init() { - gengort.Validate((*Cr3Type)(nil), 0x4, 0x1) - gengort.Validate((*Anon9_6)(nil), 0x4, 0x4) - gengort.Validate((*Anon13_10)(nil), 0x14, 0x4, "Pcid", 0x0, "PageFrameNumber", 0x4, "Reserved1", 0x8, "Reserved_2", 0xc, "PcidInvalidate", 0x10) -} diff --git a/gengo/bind/sdkMerge/bug/bug.h b/gengo/bind/sdkMerge/bug/bug.h index d6479fdc0..1d5189966 100644 --- a/gengo/bind/sdkMerge/bug/bug.h +++ b/gengo/bind/sdkMerge/bug/bug.h @@ -1,4 +1,4 @@ -##include +#include #define X86_FLAGS_RESERVED_BITS 0xffc38028 #define X86_FLAGS_FIXED 0x00000002