77 dead_code,
88 clippy:: all
99) ]
10+
11+ use zerocopy:: { FromBytes , Immutable , IntoBytes } ;
12+
1013windows_targets:: link!( "dbghelp.dll" "system" fn EnumerateLoadedModulesW64 ( hprocess : HANDLE , enumloadedmodulescallback : PENUMLOADED_MODULES_CALLBACKW64 , usercontext : * const core:: ffi:: c_void) -> BOOL ) ;
1114windows_targets:: link!( "dbghelp.dll" "system" fn StackWalk64 ( machinetype : u32 , hprocess : HANDLE , hthread : HANDLE , stackframe : * mut STACKFRAME64 , contextrecord : * mut core:: ffi:: c_void, readmemoryroutine : PREAD_PROCESS_MEMORY_ROUTINE64 , functiontableaccessroutine : PFUNCTION_TABLE_ACCESS_ROUTINE64 , getmodulebaseroutine : PGET_MODULE_BASE_ROUTINE64 , translateaddress : PTRANSLATE_ADDRESS_ROUTINE64 ) -> BOOL ) ;
1215windows_targets:: link!( "dbghelp.dll" "system" fn StackWalkEx ( machinetype : u32 , hprocess : HANDLE , hthread : HANDLE , stackframe : * mut STACKFRAME_EX , contextrecord : * mut core:: ffi:: c_void, readmemoryroutine : PREAD_PROCESS_MEMORY_ROUTINE64 , functiontableaccessroutine : PFUNCTION_TABLE_ACCESS_ROUTINE64 , getmodulebaseroutine : PGET_MODULE_BASE_ROUTINE64 , translateaddress : PTRANSLATE_ADDRESS_ROUTINE64 , flags : u32 ) -> BOOL ) ;
@@ -58,7 +61,7 @@ pub struct ADDRESS64 {
5861}
5962pub type ADDRESS_MODE = i32 ;
6063#[ repr( C ) ]
61- #[ derive( Clone , Copy ) ]
64+ #[ derive( Clone , Copy , FromBytes , Immutable ) ]
6265pub union ARM64_NT_NEON128 {
6366 pub Anonymous : ARM64_NT_NEON128_0 ,
6467 pub D : [ f64 ; 2 ] ,
@@ -67,7 +70,7 @@ pub union ARM64_NT_NEON128 {
6770 pub B : [ u8 ; 16 ] ,
6871}
6972#[ repr( C ) ]
70- #[ derive( Clone , Copy ) ]
73+ #[ derive( Clone , Copy , FromBytes , Immutable ) ]
7174pub struct ARM64_NT_NEON128_0 {
7275 pub Low : u64 ,
7376 pub High : i64 ,
@@ -76,7 +79,7 @@ pub const AddrModeFlat: ADDRESS_MODE = 3i32;
7679pub type BOOL = i32 ;
7780#[ repr( C ) ]
7881#[ cfg( target_arch = "aarch64" ) ]
79- #[ derive( Clone , Copy ) ]
82+ #[ derive( Clone , Copy , FromBytes ) ]
8083pub struct CONTEXT {
8184 pub ContextFlags : CONTEXT_FLAGS ,
8285 pub Cpsr : u32 ,
@@ -93,14 +96,14 @@ pub struct CONTEXT {
9396}
9497#[ repr( C ) ]
9598#[ cfg( target_arch = "aarch64" ) ]
96- #[ derive( Clone , Copy ) ]
99+ #[ derive( Clone , Copy , FromBytes , Immutable ) ]
97100pub union CONTEXT_0 {
98101 pub Anonymous : CONTEXT_0_0 ,
99102 pub X : [ u64 ; 31 ] ,
100103}
101104#[ repr( C ) ]
102105#[ cfg( target_arch = "aarch64" ) ]
103- #[ derive( Clone , Copy ) ]
106+ #[ derive( Clone , Copy , FromBytes , Immutable ) ]
104107pub struct CONTEXT_0_0 {
105108 pub X0 : u64 ,
106109 pub X1 : u64 ,
@@ -217,7 +220,7 @@ pub struct CONTEXT_0_0 {
217220}
218221#[ repr( C ) ]
219222#[ cfg( target_arch = "x86" ) ]
220- #[ derive( Clone , Copy ) ]
223+ #[ derive( Clone , Copy , FromBytes ) ]
221224pub struct CONTEXT {
222225 pub ContextFlags : CONTEXT_FLAGS ,
223226 pub Dr0 : u32 ,
@@ -292,7 +295,7 @@ pub struct FLOATING_SAVE_AREA {
292295}
293296#[ repr( C ) ]
294297#[ cfg( target_arch = "x86" ) ]
295- #[ derive( Clone , Copy ) ]
298+ #[ derive( Clone , Copy , FromBytes ) ]
296299pub struct FLOATING_SAVE_AREA {
297300 pub ControlWord : u32 ,
298301 pub StatusWord : u32 ,
@@ -563,7 +566,7 @@ pub struct STACKFRAME_EX {
563566 pub InlineFrameContext : u32 ,
564567}
565568#[ repr( C ) ]
566- #[ derive( Clone , Copy ) ]
569+ #[ derive( Clone , Copy , FromBytes , IntoBytes ) ]
567570pub struct SYMBOL_INFOW {
568571 pub SizeOfStruct : u32 ,
569572 pub TypeIndex : u32 ,
@@ -572,6 +575,7 @@ pub struct SYMBOL_INFOW {
572575 pub Size : u32 ,
573576 pub ModBase : u64 ,
574577 pub Flags : SYMBOL_INFO_FLAGS ,
578+ __padding0 : [ u8 ; 4 ] ,
575579 pub Value : u64 ,
576580 pub Address : u64 ,
577581 pub Register : u32 ,
@@ -580,6 +584,7 @@ pub struct SYMBOL_INFOW {
580584 pub NameLen : u32 ,
581585 pub MaxNameLen : u32 ,
582586 pub Name : [ u16 ; 1 ] ,
587+ __padding1 : [ u8 ; 2 ] ,
583588}
584589pub type SYMBOL_INFO_FLAGS = u32 ;
585590pub const SYMOPT_DEFERRED_LOADS : u32 = 4u32 ;
0 commit comments