File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
pythonbpf/vmlinux_parser/ir_gen Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ def debug_info_generation(
4242
4343 # Process all fields and create members for the struct
4444 members = []
45- for field_name , field in struct .fields .items ():
45+
46+ sorted_fields = sorted (struct .fields .items (), key = lambda item : item [1 ].offset )
47+
48+ for field_name , field in sorted_fields :
4649 try :
4750 # Get appropriate debug type for this field
4851 field_type = _get_field_debug_type (
@@ -97,7 +100,9 @@ def _get_field_debug_type(
97100 # Handle function pointer types (CFUNCTYPE)
98101 if callable (field .ctype_complex_type ):
99102 # Function pointers are represented as void pointers
100- logger .info (f"Field { field_name } is a function pointer, using void pointer" )
103+ logger .warning (
104+ f"Field { field_name } is a function pointer, using void pointer"
105+ )
101106 void_ptr = generator .create_pointer_type (None , 64 )
102107 return void_ptr , 64
103108 elif issubclass (field .ctype_complex_type , ctypes .Array ):
You can’t perform that action at this time.
0 commit comments