@@ -20,7 +20,7 @@ impl<'ctx, 'dw> EbpfContext<'ctx, 'dw> {
2020
2121 /// Compute section code for an address within a module (text=0, rodata=1, data=2, bss=3).
2222 fn section_code_for_address ( & mut self , module_path : & str , link_addr : u64 ) -> u8 {
23- if let Some ( analyzer) = self . process_analyzer . as_deref_mut ( ) {
23+ if let Some ( analyzer) = self . process_analyzer {
2424 if let Some ( st) = analyzer. classify_section_for_address ( module_path, link_addr) {
2525 return match st {
2626 ghostscope_dwarf:: core:: SectionType :: Text => 0 ,
@@ -1320,7 +1320,6 @@ impl<'ctx, 'dw> EbpfContext<'ctx, 'dw> {
13201320
13211321 let analyzer = self
13221322 . process_analyzer
1323- . as_deref_mut ( )
13241323 . ok_or_else ( || CodeGenError :: DwarfError ( "No DWARF analyzer available" . to_string ( ) ) ) ?;
13251324
13261325 let module_address = ghostscope_dwarf:: ModuleAddress :: new (
@@ -1329,7 +1328,7 @@ impl<'ctx, 'dw> EbpfContext<'ctx, 'dw> {
13291328 ) ;
13301329
13311330 let module_path_owned = module_path;
1332- let lookup_globals = |analyzer : & mut ghostscope_dwarf:: DwarfAnalyzer | -> Result <
1331+ let lookup_globals = |analyzer : & ghostscope_dwarf:: DwarfAnalyzer | -> Result <
13331332 Option < ( std:: path:: PathBuf , VariableWithEvaluation ) > ,
13341333 > {
13351334 debug ! (
@@ -1647,7 +1646,7 @@ impl<'ctx, 'dw> EbpfContext<'ctx, 'dw> {
16471646 let ctx = self . get_compile_time_context ( ) ?;
16481647 let module_path = ctx. module_path . clone ( ) ;
16491648 let pc_address = ctx. pc_address ;
1650- let analyzer = self . process_analyzer . as_deref_mut ( ) . ok_or_else ( || {
1649+ let analyzer = self . process_analyzer . ok_or_else ( || {
16511650 CodeGenError :: DwarfError ( "No DWARF analyzer available" . to_string ( ) )
16521651 } ) ?;
16531652 let module_address = ghostscope_dwarf:: ModuleAddress :: new (
@@ -1801,7 +1800,7 @@ impl<'ctx, 'dw> EbpfContext<'ctx, 'dw> {
18011800 let ctx = self . get_compile_time_context ( ) ?;
18021801 let module_path = ctx. module_path . clone ( ) ;
18031802 let pc_address = ctx. pc_address ;
1804- let analyzer = self . process_analyzer . as_deref_mut ( ) . ok_or_else ( || {
1803+ let analyzer = self . process_analyzer . ok_or_else ( || {
18051804 CodeGenError :: DwarfError ( "No DWARF analyzer available" . to_string ( ) )
18061805 } ) ?;
18071806 let module_address = ghostscope_dwarf:: ModuleAddress :: new (
@@ -1927,7 +1926,6 @@ impl<'ctx, 'dw> EbpfContext<'ctx, 'dw> {
19271926 let pc_address = ctx. pc_address ;
19281927 let analyzer = self
19291928 . process_analyzer
1930- . as_deref_mut ( )
19311929 . ok_or_else ( || CodeGenError :: DwarfError ( "No DWARF analyzer available" . to_string ( ) ) ) ?;
19321930 // First attempt: current module at current PC (locals/params)
19331931 let module_address = ghostscope_dwarf:: ModuleAddress :: new (
@@ -2095,7 +2093,7 @@ impl<'ctx, 'dw> EbpfContext<'ctx, 'dw> {
20952093 }
20962094 let ctx = self . get_compile_time_context ( ) ?;
20972095 let module_path = ctx. module_path . clone ( ) ;
2098- if let Some ( analyzer) = self . process_analyzer . as_deref_mut ( ) {
2096+ if let Some ( analyzer) = self . process_analyzer {
20992097 let mut alias_used: Option < String > = None ;
21002098 for n in candidate_names {
21012099 // Prefer cross-module definitions first to avoid forward decls with size=0 in current CU
0 commit comments