@@ -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, version_switch, 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 ! [ ] ;
@@ -944,11 +944,11 @@ impl NamespaceHierarchy {
944
944
}
945
945
}
946
946
947
- pub struct ContextualDieRef < ' a , T > {
948
- pub debug_info : & ' a DebugInformation ,
947
+ pub struct ContextualDieRef < ' node , ' dbg : ' node , T > {
948
+ pub debug_info : & ' dbg DebugInformation ,
949
949
pub unit_idx : usize ,
950
- pub node : & ' a Node ,
951
- pub die : & ' a T ,
950
+ pub node : & ' node Node ,
951
+ pub die : & ' node T ,
952
952
}
953
953
954
954
#[ macro_export]
@@ -958,26 +958,26 @@ macro_rules! ctx_resolve_unit_call {
958
958
} } ;
959
959
}
960
960
961
- impl < ' a , T > Clone for ContextualDieRef < ' a , T > {
961
+ impl < ' node , ' dbg , T > Clone for ContextualDieRef < ' node , ' dbg , T > {
962
962
fn clone ( & self ) -> Self {
963
963
* self
964
964
}
965
965
}
966
966
967
- impl < ' a , T > Copy for ContextualDieRef < ' a , T > { }
967
+ impl < ' node , ' dbg , T > Copy for ContextualDieRef < ' node , ' dbg , T > { }
968
968
969
- impl < ' a , T > ContextualDieRef < ' a , T > {
969
+ impl < ' node , ' dbg , T > ContextualDieRef < ' node , ' dbg , T > {
970
970
pub fn namespaces ( & self ) -> NamespaceHierarchy {
971
971
let entries = ctx_resolve_unit_call ! ( self , entries, ) ;
972
972
NamespaceHierarchy :: for_node ( self . node , entries)
973
973
}
974
974
975
- pub fn unit ( & self ) -> & ' a Unit {
975
+ pub fn unit ( & self ) -> & ' dbg Unit {
976
976
self . debug_info . unit_ensure ( self . unit_idx )
977
977
}
978
978
}
979
979
980
- impl < ' ctx > ContextualDieRef < ' ctx , FunctionDie > {
980
+ impl < ' ctx > ContextualDieRef < ' ctx , ' ctx , FunctionDie > {
981
981
pub fn full_name ( & self ) -> Option < String > {
982
982
self . die
983
983
. base_attributes
@@ -1007,7 +1007,7 @@ impl<'ctx> ContextualDieRef<'ctx, FunctionDie> {
1007
1007
pub fn local_variables < ' this > (
1008
1008
& ' this self ,
1009
1009
pc : GlobalAddress ,
1010
- ) -> Vec < ContextualDieRef < ' ctx , VariableDie > > {
1010
+ ) -> Vec < ContextualDieRef < ' ctx , ' ctx , VariableDie > > {
1011
1011
let mut result = vec ! [ ] ;
1012
1012
let mut queue = VecDeque :: from ( self . node . children . clone ( ) ) ;
1013
1013
while let Some ( idx) = queue. pop_front ( ) {
@@ -1033,7 +1033,7 @@ impl<'ctx> ContextualDieRef<'ctx, FunctionDie> {
1033
1033
& ' this self ,
1034
1034
pc : GlobalAddress ,
1035
1035
needle : & str ,
1036
- ) -> Option < ContextualDieRef < ' ctx , VariableDie > > {
1036
+ ) -> Option < ContextualDieRef < ' ctx , ' ctx , VariableDie > > {
1037
1037
let mut queue = VecDeque :: from ( self . node . children . clone ( ) ) ;
1038
1038
while let Some ( idx) = queue. pop_front ( ) {
1039
1039
let entry = ctx_resolve_unit_call ! ( self , entry, idx) ;
@@ -1054,7 +1054,7 @@ impl<'ctx> ContextualDieRef<'ctx, FunctionDie> {
1054
1054
None
1055
1055
}
1056
1056
1057
- pub fn parameters ( & self ) -> Vec < ContextualDieRef < ' _ , ParameterDie > > {
1057
+ pub fn parameters ( & self ) -> Vec < ContextualDieRef < ' ctx , ' ctx , ParameterDie > > {
1058
1058
let mut result = vec ! [ ] ;
1059
1059
for & idx in & self . node . children {
1060
1060
let entry = ctx_resolve_unit_call ! ( self , entry, idx) ;
@@ -1139,7 +1139,7 @@ impl<'ctx> ContextualDieRef<'ctx, FunctionDie> {
1139
1139
}
1140
1140
}
1141
1141
1142
- impl < ' ctx > ContextualDieRef < ' ctx , VariableDie > {
1142
+ impl < ' ctx > ContextualDieRef < ' ctx , ' ctx , VariableDie > {
1143
1143
pub fn ranges ( & self ) -> Option < & [ Range ] > {
1144
1144
if let Some ( lb_idx) = self . die . lexical_block_idx {
1145
1145
let entry = ctx_resolve_unit_call ! ( self , entry, lb_idx) ;
@@ -1160,7 +1160,7 @@ impl<'ctx> ContextualDieRef<'ctx, VariableDie> {
1160
1160
. unwrap_or ( true )
1161
1161
}
1162
1162
1163
- pub fn assume_parent_function ( & self ) -> Option < ContextualDieRef < ' _ , FunctionDie > > {
1163
+ pub fn assume_parent_function ( & self ) -> Option < ContextualDieRef < ' _ , ' _ , FunctionDie > > {
1164
1164
let mut mb_parent = self . node . parent ;
1165
1165
1166
1166
while let Some ( p) = mb_parent {
@@ -1181,7 +1181,7 @@ impl<'ctx> ContextualDieRef<'ctx, VariableDie> {
1181
1181
}
1182
1182
}
1183
1183
1184
- impl < ' ctx > ContextualDieRef < ' ctx , ParameterDie > {
1184
+ impl < ' ctx > ContextualDieRef < ' ctx , ' ctx , ParameterDie > {
1185
1185
/// Return max range (with max `end` address) of an underlying function.
1186
1186
/// If it's possible, `end` address in range equals to function epilog begin.
1187
1187
pub fn max_range ( & self ) -> Option < Range > {
@@ -1205,7 +1205,7 @@ impl<'ctx> ContextualDieRef<'ctx, ParameterDie> {
1205
1205
}
1206
1206
}
1207
1207
1208
- impl < ' ctx , D : AsAllocatedData > ContextualDieRef < ' ctx , D > {
1208
+ impl < ' ctx , D : AsAllocatedData > ContextualDieRef < ' ctx , ' ctx , D > {
1209
1209
pub fn r#type ( & self ) -> Option < ComplexType > {
1210
1210
let parser = r#type:: TypeParser :: new ( ) ;
1211
1211
Some ( parser. parse ( * self , self . die . type_ref ( ) ?) )
@@ -1227,7 +1227,7 @@ impl<'ctx, D: AsAllocatedData> ContextualDieRef<'ctx, D> {
1227
1227
evaluator : & evaluator,
1228
1228
expl_ctx : ctx,
1229
1229
} ,
1230
- r#type. root ,
1230
+ r#type. root ( ) ,
1231
1231
) ? as usize ;
1232
1232
let ( address, raw_data) =
1233
1233
weak_error ! ( eval_result. into_raw_bytes( type_size, AddressKind :: MemoryAddress ) ) ?;
0 commit comments