@@ -62,12 +62,14 @@ def compile_to_ir(filename: str, output: str, loglevel=logging.WARNING):
6262 if not hasattr (module , "_debug_compile_unit" ):
6363 debug_generator = DebugInfoGenerator (module )
6464 debug_generator .generate_file_metadata (filename , os .path .dirname (filename ))
65- debug_generator .generate_debug_cu (DW_LANG_C11 ,
66- f"PythonBPF { VERSION } " ,
67- True # TODO: This is probably not true
68- # TODO: add a global field here that keeps track of all the globals. Works without it, but I think it might
69- # be required for kprobes.
70- , True )
65+ debug_generator .generate_debug_cu (
66+ DW_LANG_C11 ,
67+ f"PythonBPF { VERSION } " ,
68+ True , # TODO: This is probably not true
69+ # TODO: add a global field here that keeps track of all the globals. Works without it, but I think it might
70+ # be required for kprobes.
71+ True ,
72+ )
7173
7274 processor (source , filename , module )
7375
@@ -129,7 +131,7 @@ def compile(loglevel=logging.WARNING) -> bool:
129131
130132 success = True
131133 success = (
132- compile_to_ir (str (caller_file ), str (ll_file ), loglevel = loglevel ) and success
134+ compile_to_ir (str (caller_file ), str (ll_file ), loglevel = loglevel ) and success
133135 )
134136
135137 success = bool (
@@ -156,7 +158,7 @@ def BPF(loglevel=logging.WARNING) -> BpfProgram:
156158 caller_frame = inspect .stack ()[1 ]
157159 src = inspect .getsource (caller_frame .frame )
158160 with tempfile .NamedTemporaryFile (
159- mode = "w+" , delete = True , suffix = ".py"
161+ mode = "w+" , delete = True , suffix = ".py"
160162 ) as f , tempfile .NamedTemporaryFile (
161163 mode = "w+" , delete = True , suffix = ".ll"
162164 ) as inter , tempfile .NamedTemporaryFile (
0 commit comments