@@ -11,9 +11,9 @@ pub use self::unwind::DwarfUnwinder;
11
11
12
12
use crate :: debugger:: address:: { GlobalAddress , RelocatedAddress } ;
13
13
use crate :: debugger:: debugee:: dwarf:: eval:: AddressKind ;
14
+ use crate :: debugger:: debugee:: dwarf:: eval:: EvaluationContext ;
14
15
use crate :: debugger:: debugee:: dwarf:: location:: Location as DwarfLocation ;
15
16
use crate :: debugger:: debugee:: dwarf:: r#type:: ComplexType ;
16
- use crate :: debugger:: debugee:: dwarf:: r#type:: EvaluationContext ;
17
17
use crate :: debugger:: debugee:: dwarf:: symbol:: SymbolTab ;
18
18
use crate :: debugger:: debugee:: dwarf:: unit:: {
19
19
DieRef , DieVariant , DwarfUnitParser , Entry , FunctionDie , Node , ParameterDie ,
@@ -26,7 +26,7 @@ use crate::debugger::error::Error::{
26
26
DebugIDFormat , FBANotAnExpression , FunctionNotFound , NoFBA , NoFunctionRanges , UnitNotFound ,
27
27
} ;
28
28
use crate :: debugger:: register:: { DwarfRegisterMap , RegisterMap } ;
29
- use crate :: debugger:: variable:: select :: ObjectBinaryRepr ;
29
+ use crate :: debugger:: variable:: ObjectBinaryRepr ;
30
30
use crate :: debugger:: ExplorationContext ;
31
31
use crate :: { muted_error, resolve_unit_call, weak_error} ;
32
32
use fallible_iterator:: FallibleIterator ;
@@ -512,7 +512,7 @@ impl DebugInformation {
512
512
& self ,
513
513
location : Location ,
514
514
name : & str ,
515
- ) -> Result < Vec < ContextualDieRef < ' _ , VariableDie > > , Error > {
515
+ ) -> Result < Vec < ContextualDieRef < ' _ , ' _ , VariableDie > > , Error > {
516
516
let units = self . get_units ( ) ?;
517
517
518
518
let mut found = vec ! [ ] ;
@@ -934,11 +934,11 @@ impl NamespaceHierarchy {
934
934
}
935
935
}
936
936
937
- pub struct ContextualDieRef < ' a , T > {
938
- pub debug_info : & ' a DebugInformation ,
937
+ pub struct ContextualDieRef < ' node , ' dbg : ' node , T > {
938
+ pub debug_info : & ' dbg DebugInformation ,
939
939
pub unit_idx : usize ,
940
- pub node : & ' a Node ,
941
- pub die : & ' a T ,
940
+ pub node : & ' node Node ,
941
+ pub die : & ' node T ,
942
942
}
943
943
944
944
#[ macro_export]
@@ -948,26 +948,26 @@ macro_rules! ctx_resolve_unit_call {
948
948
} } ;
949
949
}
950
950
951
- impl < ' a , T > Clone for ContextualDieRef < ' a , T > {
951
+ impl < ' node , ' dbg , T > Clone for ContextualDieRef < ' node , ' dbg , T > {
952
952
fn clone ( & self ) -> Self {
953
953
* self
954
954
}
955
955
}
956
956
957
- impl < ' a , T > Copy for ContextualDieRef < ' a , T > { }
957
+ impl < ' node , ' dbg , T > Copy for ContextualDieRef < ' node , ' dbg , T > { }
958
958
959
- impl < ' a , T > ContextualDieRef < ' a , T > {
959
+ impl < ' node , ' dbg , T > ContextualDieRef < ' node , ' dbg , T > {
960
960
pub fn namespaces ( & self ) -> NamespaceHierarchy {
961
961
let entries = ctx_resolve_unit_call ! ( self , entries, ) ;
962
962
NamespaceHierarchy :: for_node ( self . node , entries)
963
963
}
964
964
965
- pub fn unit ( & self ) -> & ' a Unit {
965
+ pub fn unit ( & self ) -> & ' dbg Unit {
966
966
self . debug_info . unit_ensure ( self . unit_idx )
967
967
}
968
968
}
969
969
970
- impl < ' ctx > ContextualDieRef < ' ctx , FunctionDie > {
970
+ impl < ' ctx > ContextualDieRef < ' ctx , ' ctx , FunctionDie > {
971
971
pub fn full_name ( & self ) -> Option < String > {
972
972
self . die
973
973
. base_attributes
@@ -997,7 +997,7 @@ impl<'ctx> ContextualDieRef<'ctx, FunctionDie> {
997
997
pub fn local_variables < ' this > (
998
998
& ' this self ,
999
999
pc : GlobalAddress ,
1000
- ) -> Vec < ContextualDieRef < ' ctx , VariableDie > > {
1000
+ ) -> Vec < ContextualDieRef < ' ctx , ' ctx , VariableDie > > {
1001
1001
let mut result = vec ! [ ] ;
1002
1002
let mut queue = VecDeque :: from ( self . node . children . clone ( ) ) ;
1003
1003
while let Some ( idx) = queue. pop_front ( ) {
@@ -1023,7 +1023,7 @@ impl<'ctx> ContextualDieRef<'ctx, FunctionDie> {
1023
1023
& ' this self ,
1024
1024
pc : GlobalAddress ,
1025
1025
needle : & str ,
1026
- ) -> Option < ContextualDieRef < ' ctx , VariableDie > > {
1026
+ ) -> Option < ContextualDieRef < ' ctx , ' ctx , VariableDie > > {
1027
1027
let mut queue = VecDeque :: from ( self . node . children . clone ( ) ) ;
1028
1028
while let Some ( idx) = queue. pop_front ( ) {
1029
1029
let entry = ctx_resolve_unit_call ! ( self , entry, idx) ;
@@ -1044,7 +1044,7 @@ impl<'ctx> ContextualDieRef<'ctx, FunctionDie> {
1044
1044
None
1045
1045
}
1046
1046
1047
- pub fn parameters ( & self ) -> Vec < ContextualDieRef < ' _ , ParameterDie > > {
1047
+ pub fn parameters ( & self ) -> Vec < ContextualDieRef < ' ctx , ' ctx , ParameterDie > > {
1048
1048
let mut result = vec ! [ ] ;
1049
1049
for & idx in & self . node . children {
1050
1050
let entry = ctx_resolve_unit_call ! ( self , entry, idx) ;
@@ -1129,7 +1129,7 @@ impl<'ctx> ContextualDieRef<'ctx, FunctionDie> {
1129
1129
}
1130
1130
}
1131
1131
1132
- impl < ' ctx > ContextualDieRef < ' ctx , VariableDie > {
1132
+ impl < ' ctx > ContextualDieRef < ' ctx , ' ctx , VariableDie > {
1133
1133
pub fn ranges ( & self ) -> Option < & [ Range ] > {
1134
1134
if let Some ( lb_idx) = self . die . lexical_block_idx {
1135
1135
let entry = ctx_resolve_unit_call ! ( self , entry, lb_idx) ;
@@ -1150,7 +1150,7 @@ impl<'ctx> ContextualDieRef<'ctx, VariableDie> {
1150
1150
. unwrap_or ( true )
1151
1151
}
1152
1152
1153
- pub fn assume_parent_function ( & self ) -> Option < ContextualDieRef < ' _ , FunctionDie > > {
1153
+ pub fn assume_parent_function ( & self ) -> Option < ContextualDieRef < ' _ , ' _ , FunctionDie > > {
1154
1154
let mut mb_parent = self . node . parent ;
1155
1155
1156
1156
while let Some ( p) = mb_parent {
@@ -1171,7 +1171,7 @@ impl<'ctx> ContextualDieRef<'ctx, VariableDie> {
1171
1171
}
1172
1172
}
1173
1173
1174
- impl < ' ctx > ContextualDieRef < ' ctx , ParameterDie > {
1174
+ impl < ' ctx > ContextualDieRef < ' ctx , ' ctx , ParameterDie > {
1175
1175
/// Return max range (with max `end` address) of an underlying function.
1176
1176
/// If it's possible, `end` address in range equals to function epilog begin.
1177
1177
pub fn max_range ( & self ) -> Option < Range > {
@@ -1195,7 +1195,7 @@ impl<'ctx> ContextualDieRef<'ctx, ParameterDie> {
1195
1195
}
1196
1196
}
1197
1197
1198
- impl < ' ctx , D : AsAllocatedData > ContextualDieRef < ' ctx , D > {
1198
+ impl < ' ctx , D : AsAllocatedData > ContextualDieRef < ' ctx , ' ctx , D > {
1199
1199
pub fn r#type ( & self ) -> Option < ComplexType > {
1200
1200
let parser = r#type:: TypeParser :: new ( ) ;
1201
1201
Some ( parser. parse ( * self , self . die . type_ref ( ) ?) )
@@ -1217,7 +1217,7 @@ impl<'ctx, D: AsAllocatedData> ContextualDieRef<'ctx, D> {
1217
1217
evaluator : & evaluator,
1218
1218
expl_ctx : ctx,
1219
1219
} ,
1220
- r#type. root ,
1220
+ r#type. root ( ) ,
1221
1221
) ? as usize ;
1222
1222
let ( address, raw_data) =
1223
1223
weak_error ! ( eval_result. into_raw_bytes( type_size, AddressKind :: MemoryAddress ) ) ?;
0 commit comments